0

My question is about the date picker as a count down timer. I am trying to set the timer to zero, but it doesnt work. I have set the minimum date and also the normal date from the date picker. But he always shows me the chosen interval, as an example 5 minutes as standard. And the user isn't able to set all to zero.

var minDate = Calendar.current.date(bySettingHour: 0, minute: 0, second: 0, of: Date())
    timePicker.minimumDate = minDate
    timePicker.date = minDate!
rmaddy
  • 314,917
  • 42
  • 532
  • 579
Programm1ng
  • 34
  • 1
  • 3
  • https://stackoverflow.com/questions/33405710/how-to-set-a-specific-default-time-for-a-date-picker-in-swift. Hope this helps you. – pvy4917 Oct 11 '18 at 17:50
  • A `UIDatePicker` in countdown mode has nothing to do with dates. Read the documentation for `minimumDate`. It says: *"The minimum and maximum dates are also ignored in the countdown-timer mode (UIDatePicker.Mode.countDownTimer)."*. – rmaddy Oct 11 '18 at 18:07
  • Ok i have made it false and how can i fix this? Do you have an solution for my problem? – Programm1ng Oct 12 '18 at 16:11

0 Answers0