Contents

date

The date displayed by the date picker.

Declaration

var date: Date { get set }

Discussion

Use this property to get and set the currently selected date. The default value of this property is the date when the UIDatePicker object is created. Setting this property animates the date picker by spinning the wheels to the new date and time; if you don’t want any animation to occur when you set the date, use the setDate(_:animated:) method, passing false for the animated parameter. This behavior of this property is undefined when the mode is set to UIDatePicker.Mode.countDownTimer; refer instead to the countDownDuration property.

See Also

Managing the date and calendar