Custom configuring calendar.
- Showing years range.
- Configuring time range at day and minutes offset.
- Disabling off-time days.
- Setting custom colors.
- Disabling previous days and intraday time.
- Disable custom time interval by minutes from today date.
Use SPM to add calendar package at project. (link)
let view = DeltaCalendarView(...)
// Return date format is yyyy-MM-dd HH:mm:ssZ
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)
// disable first two days from today.
let orderGap = OrderingGap(minutes: 2 * 24 * 60)
- UIKit
- Snapkit
- Calendar(Apple)
- Combine
- Select year/time in case when scroll is placing between items.
- Move to next/prev year by horizontal scrolling.