RSDDateRange

public protocol RSDDateRange : RSDRange

RSDDateRange defines the range of values appropriate for a date data type.

  • The minimum allowed date. When the value of this property is nil, then the allowPast property is checked for nil, otherwise allowPast is ignored.

    Declaration

    Swift

    var minDate: Date? { get }
  • The maximum allowed date. When the value of this property is nil, then the allowFuture property is checked for nil, otherwise allowFuture is ignored.

    Declaration

    Swift

    var maxDate: Date? { get }
  • Whether or not the UI should allow future dates. If nil or if minDate is defined then this value is ignored. Default is true.

    Declaration

    Swift

    var shouldAllowFuture: Bool? { get }
  • Whether or not the UI should allow past dates. If nil or if maxDate is defined then this value is ignored. Default is true.

    Declaration

    Swift

    var shouldAllowPast: Bool? { get }
  • 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? { get }
  • The date encoder to use for formatting the result. If nil then the result, minDate, and maxDate are assumed to be used for time and date with the default coding implementation.

    Declaration

    Swift

    var dateCoder: RSDDateCoder? { get }
  • The date that should be set initially.

    Declaration

    Swift

    var defaultDate: Date? { get }
  • calendarComponents Extension method

    The calendar components to include for this date range.

    Declaration

    Swift

    public var calendarComponents: Set<Calendar.Component> { get }
  • dataSource() Extension method

    Get 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

    The minimum allowed date. This is calculated by using either the minDate (if non-nil) or today’s date if allowPast is non-nil and false. If both minDate and allowPast are nil then this property will return nil.

    Declaration

    Swift

    public var minimumDate: Date? { get }
  • maximumDate Extension method

    The maximum allowed date. This is calculated by using either the maxDate (if non-nil) or today’s date if allowFuture is non-nil and false. If both maxDate and allowFuture are nil then this property will return nil.

    Declaration

    Swift

    public var maximumDate: Date? { get }