programmer138200 programmer138200 - 4 months ago 27
jQuery Question

Onshow event of datapicker

I want add class to datepicker when display. I wrote this code but don't work .

how to do this?

$(targetEl).datepicker({
dateFormat: "yy/mm/dd",
changeMonth: true,
changeYear: true,
yearRange: "-100:-13",
defaultDate: "-13y",
regional: '',
isRTL: true,
onShow: function () { $("#ui-datepicker-div").addClass("DatePikerEN"); }

});

Answer

The onShow event isn't mentioned in the documentation. Use beforeShow instead

Demo

Comments