您能帮我解决这个问题吗?我正在使用wormpress插件。我希望能够在周日和周日被标记,但是我无法处理JavaScript代码。如果有人使用它来快速导航,我会链接到该插件。 https://codecanyon.net/item/chauffeur-booking-system-for-wordpress/21072773
var minDate=0;
var maxDate=null;
var j=0;
for(var i in $option.date_available)
{
if(j===0) minDate=i;
if(j===$option.date_available.length-1)
{
if($option.date_available[i].index!==-1)
maxDate=$option.date_available[i].index;
}
j++;
}
$self.e('.chbs-datepicker').datepicker(
{
autoSize : true,
minDate : minDate,
maxDate : maxDate,
dateFormat : $option.date_format_js,
beforeShowDay : function(date)
{
var helper=new Helper();
date=$.datepicker.formatDate('dd-mm-yy',date);
for(var i in $option.date_exclude)
{
var r=helper.compareDate([date,$option.date_exclude[i].start,$option.date_exclude[i].stop]);
if(r) return([false,'','']);
}
/***/
var sDate=date.split('-');
var date=new Date(sDate[2],sDate[1]-1,sDate[0]);
var dayWeek=parseInt(date.getUTCDay(),10)+1;
if((!$option.business_hour[dayWeek].start) || (!$option.business_hour[dayWeek].stop))
return([false,'','']);
/***/
return([true,'','']);
},
onSelect : function(date,object)
{
var helper=new Helper();
var dateCurrent=[object.currentDay,object.currentMonth+1,object.currentYear];
for(var i in dateCurrent)
{
if(new String(dateCurrent[i]).length===1) dateCurrent[i]='0'+dateCurrent[i];
}
dateCurrent=dateCurrent[0]+'-'+dateCurrent[1]+'-'+dateCurrent[2];
/***/