Clearing the RadDateTimePicker with the Backspace key

2 posts, 0 answers
  1. Paul
    Paul avatar
    23 posts
    Member since:
    Feb 2013

    Posted 12 Jun 2013 Link to this post

    I have added this code to the KeyDown event for the datetimepicker and the Delete key clears the value as expected, but the Backspace key just sets the date back six months. Is there something I'm missing:

    if (e.KeyData == Keys.Delete || e.KeyData == Keys.Back)
        e.Handled = true;
  2. Stefan
    Stefan avatar
    2911 posts

    Posted 17 Jun 2013 Link to this post

    Hi Paul,

    Thank you for writing.

    It seems that the Handled flag is not taken into consideration in this case. I have logged it in our Public Issue Tracking System and you can add your vote for this issue here:

    To work around the issue you can use the KeyUp event of the control:
    void radDateTimePicker1_KeyUp(object sender, KeyEventArgs e)
        if (e.KeyData == Keys.Delete || e.KeyData == Keys.Back)

    Your Telerik Points have been updated for this report.

    Should you have any other questions or suggestions, do not hesitate to contact us.

    RadChart for WinForms is obsolete. Now what?
Back to Top