dateSelection(_:canSelectDate:)
Returns whether a user can select a date represented by date components in the calendar view.
Declaration
optional func dateSelection(_ selection: UICalendarSelectionSingleDate, canSelectDate dateComponents: DateComponents?) -> BoolParameters
- selection:
An object that tracks a date that a user selects from a calendar view.
- dateComponents:
Date components that represent a date to select.
Return Value
A Boolean value that indicates whether the calendar view can select the date you provide.
Discussion
The calendar view displays nonselectable dates as disabled.