Pikaday with month and year change date

pikaday test for mofify month and year less click on date

by netfast

HTML

<link rel="stylesheet" href="http://dbushell.github.com/Pikaday/css/pikaday.css">
<script src="http://dbushell.github.com/Pikaday/pikaday.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
<input type="text" name="start_date" id="start_date">

CSS

div.pika-label:hover {
      color: #ff9705;
    }

JavaScript

var start_date = new Pikaday({
  disableDayFn: function(date) {
    var enabled_dates = ["06/11/2019","06/17/2019","06/24/2019"]; // dates I want to enable.
    var disabled_dates = ["06/15/2019", "06/22/2019"]; // dates I want to disable.

    if ((date.getDay() === 1 || date.getDay() === 2 || ($.inArray(moment(date).format("MM/DD/YYYY"), disabled_dates) === 0)) && $.inArray(moment(date).format("MM/DD/YYYY"), enabled_dates) === -1) {
      return date;
    }
  },
  format: 'MM/DD/YYYY',
  field: document.getElementById('start_date'),

});