问题
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?
回答1:
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!
回答2:
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.
来源:https://stackoverflow.com/questions/9335875/wp7-timepicker-choose-time-in-24h-format