[英]Fullcalendar make current date as the start date and do not display previous dates
I am thinking whether it's possible in the fullcalendar to make the start date as the current date and the previous dates should not be displayed. 我正在考虑是否可以在全日历中将开始日期设为当前日期,而不应显示以前的日期。
Here's a graphical image on what I meant. 这是我的意思的图形图像。
The first day is set using the function firstDay() . 使用函数firstDay()设置第一天。
You could set it with getDay() . 您可以使用getDay()进行设置 。
$(document).ready(function() {
$('#calendar').fullCalendar({
firstDay(getDay());
})
});
For the button at the top, you could compare the calendar date (using fullCalendar getDate() ) and the current date (fullCalendar uses MomentJS for the Date handling) and then hide when needed the back button with the fullCalendar header option . 对于顶部的按钮,您可以比较日历日期(使用fullCalendar getDate() )和当前日期 (fullCalendar使用MomentJS进行日期处理),然后在需要时隐藏带有fullCalendar 标头选项的后退按钮。
on php 在PHP上
$dayOfWeek=date('w');
on fullcalendar 在全日历上
firstDay:<?php echo $dayOfWeek; ?>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.