jQuery Datepicker: Allow to type date

By | November 18, 2014

We often used jQuery datepicker to show calendar while inputting date into field. It helps to user to select particular date in correct format and easy to enter. Normally, ones we assigned jQuery datepicker object to DOM it converts that DOM to readonly so there was less chance of mistake.

How you can assign jQuery datepicker to DOM?

jQuery(‘.pickdate’).datepicker();

Click here to play with datepicker object.

As I mention above datepicker object convert DOM to readonly so how you can make it self writeable. Here is.

jQuery(‘.datepick’).datepicker().prop({‘readonly’: false});

There is no rocket science to do this. I just assign readonly property to false. Now the DOM is allowing you to write.

Leave a Reply

Your email address will not be published. Required fields are marked *