RSDDateRange
public protocol RSDDateRange : RSDRange
RSDDateRange defines the range of values appropriate for a date data type.
-
The maximum allowed date. When the value of this property is
nil, then theallowFutureproperty is checked fornil, otherwiseallowFutureis ignored.Declaration
Swift
var maxDate: Date? -
Whether or not the UI should allow future dates. If
nilor ifminDateis defined then this value is ignored. Default istrue.Declaration
Swift
var allowFuture: Bool? -
Whether or not the UI should allow past dates. If
nilor ifmaxDateis defined then this value is ignored. Default istrue.Declaration
Swift
var allowPast: Bool? -
The minute interval to allow for a time picker. A time picker will default to 1 minute if this is
nilor if the number is outside the allowable range of 1 to 30 minutes.Declaration
Swift
var minuteInterval: Int? -
The date encoder to use for formatting the result. If
nilthen the result,minDate, andmaxDateare assumed to be used for time and date with the default coding implementation.Declaration
Swift
var dateCoder: RSDDateCoder?
-
calendarComponentsExtension methodThe calendar components to include for this date range.
Declaration
Swift
public var calendarComponents: Set<Calendar.Component> -
dataSource()Extension methodGet the picker data source and formatter for this date range.
Declaration
Swift
public func dataSource() -> (RSDPickerDataSource?, Formatter)Return Value
Tuple for the picker data source and formatter.
-
minimumDateExtension method -
maximumDateExtension methodThe maximum allowed date. This is calculated by using either the
maxDate(if non-nil) or today’s date ifallowFutureis non-nil andfalse. If bothmaxDateandallowFuturearenilthen this property will returnnil.Declaration
Swift
public var maximumDate: Date?
View on GitHub
RSDDateRange Protocol Reference