Custom configuring calendar.
- Showing years range.
- Configuring time range at day and minutes offset.
- Disabling off-time days.
- Setting custom colors.
Use SPM to add calendar package at project. (link)
let view = DeltaCalendarView(...)
view.delegate = self
// Parameter "from" must be equal or less than parameter "to", otherwise it woudnt be build.
let pickingYearsData = PickingYearModel(from: 2000, to: 2030)
// Weekday must be value from 1 to 7 (gregorian calendar).
// Date format is HH:mm.
// Parameter 'start date' must be less than parameter 'end date'.
let dayTimes: [DayTimeStartModel] =
[
.init(weekday: 1, startDate: "10:00", endDate: "17:30"),
.init(weekday: 2, startDate: "09:00", endDate: "18:00")
]
// Parameter offset must be equal or more than '1'.
let showTimeData = ShowTimeModel(data: dayTimes, offset: 15)
let colors = Colors(text: .black, main: .blue, secondaryText: .lightGray, background: .white)
- UIKit
- Snapkit
- Calendar(Apple)
- Combine
- Add shimmer while calendar data will be configuring.
- Select year/time in case when scroll between items.
- Move to next/prev year by horizontal scrolling.
- Show today description at start.
- Always return hours format HH.