Time Picker...
-
Okay, I have a school assignment in which I have to use a DateTimePicker for both the date (calendar), and for selecting an events start time, and end time... What I need to know, is how to get the thing to let me select time without seconds (I know, custom format), and to hop by 30 minute increments.. Please help... I know it's easy, but time is pressing.
"Beware of bugs in the above code; I have only proved it correct, not tried it."
-
Okay, I have a school assignment in which I have to use a DateTimePicker for both the date (calendar), and for selecting an events start time, and end time... What I need to know, is how to get the thing to let me select time without seconds (I know, custom format), and to hop by 30 minute increments.. Please help... I know it's easy, but time is pressing.
"Beware of bugs in the above code; I have only proved it correct, not tried it."
Hi Chris, I dont think there is any control for your requirement. what you can do take two NumericUpDown control.For 'minutes' set control's
"Maximum"
value to 30 and"Minimum"
value to 0 and"Increment"
to 30.Take aCombobox
for AM and PM.Now create Time variable from this control input. I dont know any better solution.Live life to the fullest
-
Hi Chris, I dont think there is any control for your requirement. what you can do take two NumericUpDown control.For 'minutes' set control's
"Maximum"
value to 30 and"Minimum"
value to 0 and"Increment"
to 30.Take aCombobox
for AM and PM.Now create Time variable from this control input. I dont know any better solution.Live life to the fullest
That should work well... thanks for the reply. I was also thinking about using ComboBoxes, and adding all the increments manually, then just in code, have it find and remove the : and AM or PM characters (after storing them ofcourse) then convert to an integer (CINT) and compare what's left (630 > 600 then HalfAnHour=True) Still have some thinking to do... but it's due tommorow and I'm still hanging. The reason I have hesitated with the NumericUpDown controls is that I need fields to autopopulate on the lostfocus event of the end time. (and that's a little hard with 3 controls per time)
"Beware of bugs in the above code; I have only proved it correct, not tried it."