https://github.com/leekurg/simplecalendar
SwiftUI simple calendar view for displaying specified month's days
https://github.com/leekurg/simplecalendar
calendar calendar-view date
Last synced: 8 months ago
JSON representation
SwiftUI simple calendar view for displaying specified month's days
- Host: GitHub
- URL: https://github.com/leekurg/simplecalendar
- Owner: leekurg
- Created: 2023-09-14T08:39:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-19T10:14:30.000Z (about 2 years ago)
- Last Synced: 2024-12-30T22:41:13.503Z (9 months ago)
- Topics: calendar, calendar-view, date
- Language: Swift
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SimpleCalendar
SwiftUI simple calendar view for displaying specified month's days. Supports **iOS v14**.
![]()
### Overview
Simple, easy-to-use or change calendar view. Feel free to take and change on your behalf.### Details
Repository includes a package **SimpleCalendar** for install and project **SimpleCalendarExample** with example of usage.### Features
1. Ease-to-use API: give to **SimpleCalendar** month and year numbers, or just a `Date`
2. Use your own calendar configuration, or use default configuration `.localizedCurrent`, which is `Calendar` instance, localized with app's preferred language
4. Configure font size
5. Choose built-in styles of calendar's header - localized short, full or completely off day titles
6. Configure header padding or cell spacing
7. Use built-in modifier `.calendarTintColor()` to change **SimpleCalendar** tint color appearence### Install
`SPM` installation: in **Xcode** tap «**File → Add packages…**», paste is search field the URL of this page and press «**Add package**».### Usage
Annotate `SwiftUI` file with «**import SimpleCalendar**». Then pass to **SimpleCalendarView** month and year `Int`'s or just a `Date`:```
SimpleCalendarView(
month: 9,
year: 2023,
calendar: .localizedCurrent,
fontSize: 18,
verticalCellPadding: 10,
weekdayHeaderPadding: 15,
weekdaySymbolFormat: .short
)
.padding(15)
.calendarTintColor(.orange)
```