code: function addcalendarExtenderToDateInputs () {
    //get and loop all the input[type=date]s in the page that dont have "haveCal" class yet
    var dateInputs = document.querySelectorAll('input[type=date]:not(.haveCal)');
    [].forEach.call(dateInputs, function (dateInput) {
      //call calendarExtender function on the input
      new calendarExtender(dateInput);
      //mark that it have calendar
      dateInput.classList.add('haveCal');
    });
  }
docs: will add the calendarExtender to all inputs in the page