MakingSense / moment-datepicker

[ABANDONED REPOSITORY] The best bootstrap datepicker!
Apache License 2.0
92 stars 64 forks source link

Honoring the READONLY on <INPUT> and don't show the datepicker #22

Open neoDD69 opened 11 years ago

neoDD69 commented 11 years ago

Hi, thanks for your code. I've noted that if the html <INPUT readonly> is binded with datepicker, the picker shown also if the INPUT is marked READONLY! (eg: javascript $("input").prop("readOnly",true);)

I've tested this changes to moment-datepicker.js and seems to work:

Line106

show: function (e) {
if (!e.currentTarget.readOnly)      //DD 20/05/2013 14:19:29    
{
...
}