BPKCalendar
public struct BPKCalendar<DayAccessoryView> : View where DayAccessoryView : View
BPKCalendar
is a SwiftUI view that represents a calendar.
This view is designed to be customizable and flexible. It allows you to specify the type of selection, the calendar system, and the valid range of dates.
The BPKCalendar
view also allows you to specify an accessory action. This is a closure that takes a string and
a date, and is called when the user interacts with an accessory in the calendar.
Parameters
selectionType
|
The type of selection that the calendar should support. This can be single, range, or multiple. |
calendar
|
The calendar system that the calendar should use. This can be any calendar system supported by
the |
validRange
|
The range of dates that the calendar should allow the user to select.
This is specified as a |
-
Declaration
Swift
public init( selectionType: CalendarSelectionType, calendar: Calendar, validRange: ClosedRange<Date>, dayAccessoryView: @escaping (Date) -> DayAccessoryView = { _ in EmptyView() } )
-
Declaration
Swift
public var body: some View { get }
-
Sets the accessory action for the calendar to be applied to each month.
Declaration
Swift
public func monthAccessoryAction(_ action: CalendarMonthAccessoryAction) -> BPKCalendar