I want to blackout specific dates (e.g. 5-20-2015 to 5-25-2015) on four different JQuery datepickers on a single page. What is the easiest way (lightweight) to go about this?
HTML
<label>Date Picker 1</label><input type="text" id="datepicker" name="Datepicker" style="border-radius:5px; font-family: sans-serif; color:#333; font-size:14px; margin-bottom:5px;">
<label>Date Picker 2</label><input type="text" id="datepicker22" name="Datepicker2" style="border-radius:5px; font-family: sans-serif; color:#333; font-size:14px; margin-bottom:5px;">
<label>Date Picker 3</label><input type="text" id="datepicker3" name="Datepicker3" style="border-radius:5px; font-family: sans-serif; color:#333; font-size:14px; margin-bottom:5px;">
<label>Date Picker 4</label><input type="text" id="datepicker4" name="Datepicker4" style="border-radius:5px; font-family: sans-serif; color:#333; font-size:14px; margin-bottom:5px;">
jQuery
<script>
$(function() {
$( "#datepicker" ).datepicker({
minDate:3,
maxDate:180,
dateFormat:"DD, d MM, yy",
changeMonth:true,
showButtonPanel:true
});
});
$(function() {
$( "#datepicker2" ).datepicker({
minDate:3,
maxDate:180,
dateFormat:"DD, d MM, yy",
changeMonth:true,
showButtonPanel:true
});
});
$(function() {
$( "#datepicker3" ).datepicker({
minDate:3,
maxDate:180,
dateFormat:"DD, d MM, yy",
changeMonth:true,
showButtonPanel:true
});
});
$(function() {
$( "#datepicker4" ).datepicker({
minDate:8,
maxDate:180,
dateFormat:"DD, d MM, yy",
changeMonth:true,
showButtonPanel:true
});
});
</script>
Code for original datepicker here: https://jqueryui.com/datepicker/