JSFiddle - React, Tailwind, and code Playground

by KJ

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
<p>
Date: <input id="datepicker" type="text">
</p>

JavaScript

$(document).ready(function(){
	$("#datepicker").datepicker({
  	changeMonth: true,
		changeYear: true,
  	beforeShowDay:function(dt){
    	var enableDay = ["15-8-2016","5-9-2016","11-10-2016","31-10-2016","10-11-2016", "26-12-2016"];       var dmy = dt.getDate() + "-" + (dt.getMonth() + 1) + "-" + dt.getFullYear();
    	if ($.inArray(dmy, enableDay) > -1){
    		return [true, ""];
    	}else{
    		return [dt.getDay() == 0 || dt.getDay() == 6];
    	}           
    }
  });
});