mootools-datepicker icon indicating copy to clipboard operation
mootools-datepicker copied to clipboard

Allow user to delete the date (even with "blockKeydown: true")

Open basher opened this issue 13 years ago • 0 comments

Hi Arian,

See http://thelawyercpdselfservicedesign.abasoft.co.uk/_datepicker+validation.html

I have added a function to allow DELETE & BACKSPACE keys to empty the date fields:

$$('input.calendar').each(function(el){ el.addEvent('keydown', function(event) { if (event.key == 'delete' || event.key == 'backspace') el.set('value', ''); else event.stop(); }); });

Can this functionality be incorporated into base class?

Many thanks, Kev ([email protected])

basher avatar Sep 30 '11 09:09 basher