DateTimePicker format

Chong

Regular
Joined
Apr 4, 2003
Messages
79
Anyone know a way to prevent the DateTimePicker from having the right drop down arrow? I want to use the DateTimePicker as a Time and so I don't want to have the drop down as an option.

Many thanks for the help!

ljCharlie
 
If it's possible, how do I format the DateTimePicker to have a drop down that looks like the one MS Outlook appointment uses? In MS Outlook under the appointment, the time drop down only display the time or hour and not day, month, and year. Anyone know how this can be done?

aljCharlie
 
To have the DateTimePicker show only the time, change the Format to Time.

I know of no way to get the DateTime picker to display a drop down with the time in it - it only shows the Calendar control (even if you specify the Format as Time).

The dropdown used in Outlook isn't using the DateTimePicker afaik. You can tell because the button to the right is a separate button, not part of the actual control. I would guess they're just looping and filling a Combobox (or something similar) with the time values they want.

As far as removing the drop-down button, the closest I can see is setting ShowUpDown to True, which changes the DropDown button to two of the tiniest up/down buttons I've ever seen.

If you're really pressed for space and want to remove the button to save 16 pixels (or whatever the width is), you *might* be able to remove the button using the API. But I would definitely NOT try that unless *absolutely* necessary. And I don't think you'll find much help on how to do it.

-Nerseus
 
Thank you very much for your help. I was able to get it closer to what I need now. By using the ShowUpDown, I was able to get rid of the dropdown arrow. This ShowUpDown helps a lot.

Many thanks for your contribution.

ljCharlie
 
Back
Top