I have a DatePicker for selecting birthday.
This is going to be used for some filtering, and after the filtering, I will like the value to be
If you want to clear the TextField
of the DatePicker
, you can use :
datepicker.getEditor().clear();
If you want to clear the value and the textfield, use :
datePicker.setValue(null);
just add this code
}).keyup(function(e) {
if(e.keyCode == 8 || e.keyCode == 46) {
$.datepicker._clearDate(this);
}
});
You can use backspace to clear field even if it has in read only mode. Source