DateField

public class DateField : Field

Material version of the UIDatePicker

  • Date value currently held by field.

    Declaration

    Swift

    public var date: Date? { get set }
  • The dateFormatter you want to use to display the date in the field. Defaults to MMM dd, yyyy

    Declaration

    Swift

    public var dateFormatter: DateFormatter?
  • The date picker mode for the field.

    Declaration

    Swift

    public var datePickerMode: UIDatePicker.Mode? { get set }
  • The timezone for the field.

    Declaration

    Swift

    public var timeZone: TimeZone? { get set }
  • The locale for the field.

    Declaration

    Swift

    public var locale: Locale? { get set }
  • The minimum date for the field.

    Declaration

    Swift

    public var minimumDate: Date? { get set }
  • The default date of the field.

    Declaration

    Swift

    public var defaultDate: Date? { get set }
  • The maximum date of the field.

    Declaration

    Swift

    public var maximumDate: Date? { get set }
  • Setter for showing a clear button to eliminate the contents of the field.

    Declaration

    Swift

    public var isClearable: Bool { get set }
  • Declaration

    Swift

    public override var placeholder: String? { get set }
  • Declaration

    Swift

    public override var isOptional: Bool { get set }
  • Declaration

    Swift

    public override var borderColor: UIColor { get set }
  • Declaration

    Swift

    public override var borderHighlightColor: UIColor { get set }
  • Declaration

    Swift

    public override var textColor: UIColor { get set }
  • Declaration

    Swift

    public override var placeholderDownColor: UIColor { get set }
  • Declaration

    Swift

    public override var placeholderUpColor: UIColor { get set }
  • Undocumented

    Declaration

    Swift

    public var clearButtonColor: UIColor { get set }
  • Undocumented

    Declaration

    Swift

    public var doneButtonColor: UIColor { get set }
  • The reciever’s delegate

    Declaration

    Swift

    weak public var delegate: DateFieldDelegate?
  • Declaration

    Swift

    public override var shakes: Bool { get set }
  • Required initializer if doing programtically. You can manually set the frame after initialization. Otherwise it relies on auto layout and its intrinsic content size.

    Warning

    Refer to the Field Guide in the online documentation if you want to define height constraints.

    Declaration

    Swift

    public required init()
  • Notifies the field that it has been asked to relinquish its status as first responder in its window. This triggers the end callback from the field, closes the picker, and removes the editing state.

    Note

    If it’s in an error state it will keep its error UI.

    Declaration

    Swift

    override public func resignFirstResponder() -> Bool

    Return Value

    true

  • Opens the picker.

    Declaration

    Swift

    override public func becomeFirstResponder() -> Bool

    Return Value

    true

  • Returns isActive flag.

    Declaration

    Swift

    override public var isFirstResponder: Bool { get }
  • Returns true

    Declaration

    Swift

    public override var canBecomeFirstResponder: Bool { get }