FUICalendarViewDelegate

public protocol FUICalendarViewDelegate : AnyObject

This protocol provides methods for handling actions based on the state of the FUICalendarView.

  • This method is called after the calendar view has been scrolled.

    In the case of month style, the next section is the previous month or the next month depending upon the direction of the scroll. In the case of week style, it is the next (or previous) set of 7 dates.

    Default implementation is provided that does nothing.

    Declaration

    Swift

    func calendarView(_ calendarView: FUICalendarView, didChangeVisibleDatesTo visibleDates: FUIVisibleDates)
  • This method is called when a date is selected in month, week, and expandable styles.

    In the case of rangeSelection and datesSelection, this method is not called. Rather, the calendarView(: didChangeSelections:) is called any time the selected date range changes.

    Default implementation is provided that does nothing.

    Declaration

    Swift

    func calendarView(_ calendarView: FUICalendarView, didSelectDate date: Date, cell: FUICalendarItemCollectionViewCell)
  • This method is called when a date is deselected in month, week, and expandable styles.

    In the case of rangeSelectionView, this method is not called. Rather, the calendarView(: didChangeSelections:) is called any time the selected date range changes.

    Default implementation is provided that does nothing.

    Declaration

    Swift

    func calendarView(_ calendarView: FUICalendarView, didDeselectDate date: Date, cell: FUICalendarItemCollectionViewCell)
  • This method is called before a cell is displayed.

    Default implementation is provided that does nothing.

    Declaration

    Swift

    func calendar(_ calendarView: FUICalendarView, willDisplay cell: FUICalendarItemCollectionViewCell, forItemAt date: Date, indexPath: IndexPath)
  • This method is called each time the title is updated due to user actions, such as scrolling to the next section, or selecting or deselecting a date.

    Default implementation is provided that does nothing.

    Declaration

    Swift

    func calendarView(_ calendarView: FUICalendarView, didChangeTitleTo title: String)
  • This method is called when a date (in month, week, expandable, and datesSelection) or date range (in rangeSelectionView) selection is changed.

    Declaration

    Swift

    func calendarView(_ calendarView: FUICalendarView, didChangeSelections selections: [FUIDateSelection])