Add picker_mode for Date Row #47

merged 2 commits into from Nov 19, 2012


None yet

2 participants


I added the date picker mode to Date rows so that it's possible to have a date picker, a time picker, a date and time picker or a countdown picker.

I'm no Cocoa expert so I hope that this code is okay regarding the UIDatePicker class.



The :datetime mode would need a custom formatter, I don't know what the output should be regarding the format so I left it as a standard :date mode.


Hey Julien, I haven't looked at this in-depth but I will today or tomorrow. Sorry about the delay, and thanks for the PR!

@clayallsopp clayallsopp merged commit 8e8260c into clayallsopp:master Nov 19, 2012

Merged, thanks!

Changes I made (see 41b5f5c):

  • :datetime becomes :date_time
  • the row.value should always store the time as an integer; only how it's presented will change depending on formatting (see #update_text_field)
  • Switched to using NSDateFormatter instead of strftime
  • UIDatePickerModeCountDownTimer uses the countDownDuration property of UIDatePicker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment