Completed
Last Updated: 22 Jul 2014 15:11 by Jesse Dyck
ADMIN
Stefan
Created on: 17 Jun 2013 05:26
Category: Editors
Type: Bug Report
2
FIX. RadDateTimePicker - setting the Handled property in the KeyDown event is not taken into consideration
To reproduce: if (e.KeyData == Keys.Back) { radDateTimePicker1.SetToNullValue(); e.Handled = true; } 

Workaround: void radDateTimePicker1_KeyUp(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Back) { radDateTimePicker1.SetToNullValue(); } }

Resolution: 
Users should handle also KeyPress event (and KeyDown event) because the keys.Back is processed on KeyPress  :

         void radDateTimePicker1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\b')
            {
                this.radDateTimePicker1.SetToNullValue();
                e.Handled = true;
            }
        }
1 comment
Jesse Dyck
Posted on: 17 Jun 2013 12:05
Using the workaround, the text in the date picker control is temporarily set to a new value on the KeyDown event and then cleared on the KeyUp event. This is not a clean solution and we won't be able to implement it.