Hi,
You can find following javascript code in /js/theme-scripts.js file.
tjq(this).datepicker({
showOn: 'button',
buttonImage: 'images/icon/blank.png',
buttonText: '',
buttonImageOnly: true,
changeYear: false,
/*showOtherMonths: true,*/
minDate: minDate,
dateFormat: "mm/dd/yy",
dayNamesMin: ["S", "M", "T", "W", "T", "F", "S"],
beforeShow: function(input, inst) {
var themeClass = tjq(input).parent().attr("class").replace("datepicker-wrap", "");
tjq('#ui-datepicker-div').attr("class", "");
tjq('#ui-datepicker-div').addClass("ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all");
tjq('#ui-datepicker-div').addClass(themeClass);
},
onClose: function(selectedDate) {
if ( tjq(this).attr('name') == 'date_from' ) {
if ( tjq(this).closest('form').find('input[name="date_to"]').length > 0 ) {
tjq(this).closest('form').find('input[name="date_to"]').datepicker("option", "minDate", selectedDate);
}
}
if ( tjq(this).attr('name') == 'date_to' ) {
if ( tjq(this).closest('form').find('input[name="date_from"]').length > 0 ) {
tjq(this).closest('form').find('input[name="date_from"]').datepicker("option", "maxDate", selectedDate);
}
}
}
});
and replace it with following.
var disabledDates = ["01/15/2019","01/16/2019","01/28/2019"];
tjq(this).datepicker({
showOn: 'button',
buttonImage: 'images/icon/blank.png',
buttonText: '',
buttonImageOnly: true,
changeYear: false,
/*showOtherMonths: true,*/
minDate: minDate,
dateFormat: "mm/dd/yy",
dayNamesMin: ["S", "M", "T", "W", "T", "F", "S"],
beforeShowDay: function(date){
var string = jQuery.datepicker.formatDate('mm/dd/yy', date);
if (tjq.inArray(string, disabledDates) != -1) {
return [false, "","UnAvailable"];
} else{
return [true,"","Available"];
}
},
beforeShow: function(input, inst) {
var themeClass = tjq(input).parent().attr("class").replace("datepicker-wrap", "");
tjq('#ui-datepicker-div').attr("class", "");
tjq('#ui-datepicker-div').addClass("ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all");
tjq('#ui-datepicker-div').addClass(themeClass);
},
onClose: function(selectedDate) {
if ( tjq(this).attr('name') == 'date_from' ) {
if ( tjq(this).closest('form').find('input[name="date_to"]').length > 0 ) {
tjq(this).closest('form').find('input[name="date_to"]').datepicker("option", "minDate", selectedDate);
}
}
if ( tjq(this).attr('name') == 'date_to' ) {
if ( tjq(this).closest('form').find('input[name="date_from"]').length > 0 ) {
tjq(this).closest('form').find('input[name="date_from"]').datepicker("option", "maxDate", selectedDate);
}
}
}
});
and try again.
Regards, C-Themes