"minimumDate" feature of YUI 3 calendar is not working in Internet Explorer, is there any alternate hack available for the default calendar API?

58 views Asked by At

My Code looks as 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>

Output of the above code

The code works nicely in all browsers except Internet Explorer where it is not disabling the dates which are older than the minimum date. Is there any customized or hacked version available for calendar api with proper working style of minimum date for IE, any help would be appreciated.

0

There are 0 answers