javascript - "minimumDate" feature of YUI 3 calendar is not working in Internet Explorer, is there any alternate hack available for the default calendar API? -
my code looks follows.
<script> var yahoo_yui=yui(); yahoo_yui.use('calendar', 'datatype-date', 'cssbutton', function (g) { minimum_date="2016-10-7"; calendar = new g.calendar({ contentbox: "#yahoo-calendar", width:'340px', showprevmonth: false, shownextmonth: true, minimumdate: new date(minimum_date), date:new date(minimum_date.split(",").join("/")) }).render(); var dtdate = g.datatype.date; calendar.on("selectionchange", function (ev) { var newdate = ev.newselection[0]; g.one(".yahoo_date_selected").set('value',dtdate.format(newdate)); g.one("#yahoo-calendar").toggleview(); }); g.all("#togglecalendar,.yahoo_date_selected").on('click', function (ev) { g.one('#yahoo-calendar').toggleview(); ev.preventdefault(); calendar.set('showprevmonth', !(calendar.get("showprevmonth"))); }); }); // g use ends here. </script>
the code works nicely in browsers except internet explorer not disabling dates older minimum date. there customized or hacked version available calendar api proper working style of minimum date ie, appreciated.
Comments
Post a Comment