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

Restrict user to enter date from keyboard

1 Answer 54 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Saikiran
Top achievements
Rank 1
Saikiran asked on 26 Aug 2011, 11:59 AM
Hi,


Actually in RadDateTimePicker,  I want to restrict the user to enter date from keyboard .
i.e permit user to select date using drop down not by typing.
please give solution ASAP.. urgent!!!!


Best regards
Saikiran Ch

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 31 Aug 2011, 06:28 PM
Hello Saikiran,

Thank you for writing.

The easiest way to achieve this functionality is to subscribe to the KeyDown event of RadDateTimePicker and set the SupressKeyDown property from the event arguments to true:
void DateTimePickerElement_KeyDown(object sender, KeyEventArgs e)
{
    e.SuppressKeyPress = true;
}
 
I hope that you find this information helpful. Should you have any other questions, do not hesitate to contact us.

Greetings,
Stefan
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Saikiran
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or