This is a migrated thread and some comments may be shown as answers.

Add mask template to DateTimePicker

1 Answer 130 Views
DateTimePicker
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 27 Jul 2010, 04:12 PM
Are there any plans to add the ability to specify a mask template for the data entry of the DateTimePicker?  For example, I might specify the Short DisplayFormat and the InputMode of DatePicker to allow only a date to be entered/selected.  But as it exists today, I can type in any set of characters into the input portion of the control.  The control will let you know that the input is invalid but it would be nice to not allow the characters to be entered in the first place.

I know that there is a workaround to combine the MaskedTextbox control with the DateTimePicker to achieve this behavior but that is more overhead that could be avoided if the masking logic was included with the DateTimePicker control.

Thanks

1 Answer, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 28 Jul 2010, 09:30 AM
Hello Randy,

 The DateTimePicker control is designed to have free text box where you can type arbitrary strings and the control tries to parse your input. We are not currently planning to add masked behavior to it as this will limit typing strings like "Monday" or "tomorrow". Though we will consider your suggestion.

What I could suggest you is to use a MaskedTextBox, a DropDownButton and a Calendar in the DropDownButton - this is similar to what we do in the DateTimePicker control.

All the best,
Miroslav Nedyalkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
DateTimePicker
Asked by
Randy
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question
or