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 theallowFuture
property is checked fornil
, otherwiseallowFuture
is ignored.Declaration
Swift
var maxDate: Date?
-
Whether or not the UI should allow future dates. If
nil
or ifminDate
is defined then this value is ignored. Default istrue
.Declaration
Swift
var allowFuture: Bool?
-
Whether or not the UI should allow past dates. If
nil
or ifmaxDate
is 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
nil
or 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
nil
then the result,minDate
, andmaxDate
are assumed to be used for time and date with the default coding implementation.Declaration
Swift
var dateCoder: RSDDateCoder?
-
calendarComponents
Extension 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.
-
minimumDate
Extension method -
maximumDate
Extension methodThe maximum allowed date. This is calculated by using either the
maxDate
(if non-nil) or today’s date ifallowFuture
is non-nil andfalse
. If bothmaxDate
andallowFuture
arenil
then this property will returnnil
.Declaration
Swift
public var maximumDate: Date?