To change the range of year in date filed calender add this script to the Visualforce page.

To change the range of year in date filed calender add this script to the Visualforce page.

<script>
  (function() {
    var windowOnload = window.onload;
    window.onload = function() {
      if (windowOnload) windowOnload();
      var select = document.getElementById('calYearPicker');
      if (!select) return;

      select.innerHTML = '';
      var startYear = new Date().getFullYear() - 90;
      for (var year = startYear; year < startYear + 100; year++) {
        select.options[select.options.length] = new Option(year, year);
      }
    }
  }());
</script>

Comments

Popular Posts