Zik
Zik

Reputation: 750

WP7 TimePicker choose time in 24h format

Is there a way to get WP7's TimePicker to allow the user to select the time in 24 hour format? If I set TimePicker.ValueStringFormat to "{0:HH:mm:ss}" it displays in 24h format, but when I click it the input time is still 12h format (with AM/PM). Can TimePicker be configured to scroll 0-23 instead of 1-12 with AM/PM?

Upvotes: 2

Views: 2736

Answers (2)

Enzo Contini
Enzo Contini

Reputation: 96

Here you can find a link that can help: however I notice that now the timePicker handle the 12-24 hours conversion authomatically depending on the phone date-time setting!

Upvotes: 3

MarcinJuraszek
MarcinJuraszek

Reputation: 125630

Some possibilities:

  • use custom time picker control, eg. this one

  • create you own page implementing IDateTimePickerPage interface and point to it in PickerPageUri property of TimePicker control (more info)

I know it should be done easier on standard TimePicker control, but it isn't, so you have to deal with it on your own.

Upvotes: 0

Related Questions