DateItem
public class DateItem : RVS_CalendarInputDateItemProtocol
This is one element of the data that is provided to, and read from, the view.
This is a class, as opposed to a struct, because we rely on reference semantics to set and get state.
-
The year, as an integer. REQUIRED
Declaration
Swift
public var year: Int
-
The month, as an integer (1 -> 12). REQUIRED
Declaration
Swift
public var month: Int
-
The day of the month (1 -> [28|29|30|31]), as an integer. REQUIRED
Declaration
Swift
public var day: Int
-
True, if the item is enabled for selection. Default is false. OPTIONAL
Declaration
Swift
public var isEnabled: Bool
-
True, if the item is currently selected. Default is false. OPTIONAL
Declaration
Swift
public var isSelected: Bool
-
Reference context. This is how we attach arbitrary data to the item. OPTIONAL
Declaration
Swift
public var refCon: Any?
-
Default Initializer. The calendar used, will be the current one.
Declaration
Parameters
day
The day of the month (1 -> [28|29|30|31]), as an integer. REQUIRED
month
The month, as an integer (1 -> 12). REQUIRED
year
The year, as an integer. REQUIRED
isEnabled
True, if the item is enabled for selection. Default is false. OPTIONAL
isSelected
True, if the item is currently selected. Default is false. OPTIONAL
refCon
Reference context. This is how we attach arbitrary data to the item. OPTIONAL
-
DateComponents Initializer (can return nil)
Declaration
Swift
public convenience init?(dateComponents inDateComponents: DateComponents, isEnabled inIsEnabled: Bool = false, isSelected inIsSelected: Bool = false, calendar inCalendar: Calendar? = nil, refCon inRefCon: Any? = nil )
Parameters
dateComponents
The day/month/year, as DateComponents. The calendar used, will be the current one. REQUIRED
isEnabled
True, if the item is enabled for selection. Default is false. OPTIONAL
isSelected
True, if the item is currently selected. Default is false. OPTIONAL
refCon
Reference context. This is how we attach arbitrary data to the item. OPTIONAL
-
Date Initializer (can return nil)
Declaration
Swift
public convenience init?(date inDate: Date, isEnabled inIsEnabled: Bool = false, isSelected inIsSelected: Bool = false, calendar inCalendar: Calendar? = nil, refCon inRefCon: Any? = nil )
Parameters
date
The day/month/year, as a Date instance. The calendar used, will be the current one. REQUIRED
isEnabled
True, if the item is enabled for selection. Default is false. OPTIONAL
isSelected
True, if the item is currently selected. Default is false. OPTIONAL
refCon
Reference context. This is how we attach arbitrary data to the item. OPTIONAL