选择结束日期

问题描述:

当我在Fullcalendar中选择日期时,日期在午夜结束。我如何更改默认的结束日期和时间?我希望它只在选定日期的上午9点结束。选择结束日期

var startDate =$.fullCalendar.moment(start).format('MM/DD/YYYY hh:mm a'); // Create a clone 
start.stripTime();  // The time should already be stripped but lets do a sanity check. 
start.time('08:00:00'); // Set a default start time. 
start.hasTime(); 

var endDate = $.fullCalendar.moment(end).format('MM/DD/YYYY hh:mm a'); 
end.stripTime();  // The time should already be stripped but lets do a sanity check. 
end.time('09:00:00'); 
end.hasTime(); 

是的,天通常在午夜结束:)

你可以做的是限制你在fullCalendar显示时间。 你可以做到这一点设置属性minTimemaxTime

喜欢的东西:

$('#calendar').fullCalendar({ 
    minTime: "08:00:00", // Duration object, default: "00:00:00" 
    maxTime: "09:00:00" // Duration object, default: "24:00:00" 
});