0

I'm trying to create a picker for a TimeSpan - not a time of day. I've tried using the standard TimePicker control, but can't get it to drop time of day formatting in the picker itself - the output format I can change, but the picker always seems to show AM/PM and start at 12:00 not 0:00

I also tried hacking a control together via three independent Picker controls but that just doesn't feel very right.

Is there a control I'm missing, or may some setting on TimePicker I can't find, to let it choose an amount of time, not a time of day?

Deeko
  • 1,514
  • 9
  • 29
  • "I also tried hacking a control together via three independent Picker controls but that just doesn't feel very right." That is what i ended up doing too. I guess this is just not too much of a common case to have it's own control - mind you iOS does not have a built in for this either, which i am aware of – Dbl Mar 23 '17 at 12:39

2 Answers2

0

I had to deal with the same problem lately.
In my case I needed a picker with 3 columns: hh:mm:ss.
Based on the example from this thread I managed to solve the problem.
The solution is available on github.

In short, you have to extend Picker and PickerRenderer to add your own functionality. Don't try to use UIDatePickerModeCountDownTimer it has a bug.

Community
  • 1
  • 1
EvZ
  • 11,889
  • 4
  • 38
  • 76
0

if you are into any 3rd party UI components provider you can check out Telerik's components. They are versatile and fully customizable. At the moment we have a DateTimePicker which can be customized as Date only or Time only picker. We are working on creating TimeSpan picker which will provide the required functionality and customization.

Pavel Pavlov
  • 697
  • 2
  • 9
  • 18