I'm trying to find a way to activate the calendar of a RadDateTimePicker control and show the popup using the keyboard instead of using the mouse. What I would like is to activate the popup when the user performs a key combination of ctrl+L or ctrl+?. How would I go about doing this?
1 Answer, 1 is accepted
0
Ralitsa
Telerik team
answered on 22 Apr 2014, 10:45 AM
Hello Cuong,
Thank you for contacting us.
The default shortcut to show the calendar of RadDateTimePicker is functional key F4. If you need to add another shortcut, you can subscribe to KeyDown event and show the calendar. Please take a look at the following code example:
if (e.Modifiers == Keys.Control && e.KeyCode == Keys.L)
{
RadDateTimePickerCalendar calendarBehavior = this.radDateTimePicker1.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar;
if (calendarBehavior != null)
{
calendarBehavior.ShowDropDown();
}
}
}
Should you have further questions, I would be glad to help.
Regards,
Ralitsa
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.