izokurew
izokurew

Reputation: 458

Can I change the input behaviour of a DateTimePicker control?

The default input behaviour of the DateTimePicker when entering a date is like this:

YYYY(Right Arrow)MM(Right Arrow)DD

The user want to enter the date like this:

YYYYMMDD

Is there any simple way of modifying the input behaviour of the DateTimePicker so that is does behave like the user want it to?

TIA

Upvotes: 1

Views: 1022

Answers (2)

MBoy
MBoy

Reputation: 704

Expanding on PoweRoy's answer. Use a textbox and a datetimepicker. Make the datetimepicker small (just as big as the drop down arrow) and place it next to (or even inside) the textbox. Then you hook the dropdown and closeup events of the datetimepicker to get the value to and from the editbox.

Upvotes: 1

RvdK
RvdK

Reputation: 19790

I don't know how you use the DateTimePicker but what about using a simple editbox? (and validate date when a date is entered)

DateTimePicker is mostly used to choose a date without entering any number.

Upvotes: 0

Related Questions