I have DateTimePicker controls with a custom format to show hours/minutes as well as the date (“MM/dd/yyyy HH:mm”). The problem I have is that if I use the up/down arrow keys to change the values they don’t roll over properly when they overflow.
ex1
initial value 03/23/2011 16:58
Select minutes, hit the up arrow once: value updates to 03/23/2011 16:59 as expected
Hit up arrow a second time: value updates to 03/23/2011 16:00, not 17:00 as expected.
ex2
initial value 03/23/2011 16:00
Select minutes, hit the down arrow once: value updates to 03/23/2011 16:59, not 15:59 as expected.
ex3
initial value 03/23/2011 23:03
Select hours, hit the up arrow once: value updates to 03/23/2011 00:03, not 03/24/2011 00:03 as expected.
Edit: The reason this is problematic on what I’m doing is that I’m using the DTPs to adjust the placement of objects on a timeline, and the default rollover results in the object jumping back. This is aggravated by the order of the objects being fixed. If two are at 16:05 and 16:59, the up arrow rollover on the 2nd would result in it changing to 16:00 which is invalid.
This is the expected behaviour of the DateTimePicker.