Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 完整日历-选择年底前的所有星期六?_Javascript_Jquery_Select_Fullcalendar - Fatal编程技术网

Javascript 完整日历-选择年底前的所有星期六?

Javascript 完整日历-选择年底前的所有星期六?,javascript,jquery,select,fullcalendar,Javascript,Jquery,Select,Fullcalendar,我很难用FullCalendar选择日期。通常,您可以通过添加highlight类来选择星期六: $('.fc-sat').addClass('.fc-state-highlight'); 但这将只选择您正在查看的月份的星期六 calendar = $('#calendar').fullCalendar({}); $('button').click(function(){ // select all saturdays until end o

我很难用FullCalendar选择日期。通常,您可以通过添加highlight类来选择星期六:

$('.fc-sat').addClass('.fc-state-highlight');
但这将只选择您正在查看的月份的星期六

 calendar = $('#calendar').fullCalendar({});

          $('button').click(function(){
              // select all saturdays until end of year
              calendar.fullCalendar( 'select', start, [ end ] )
          });
我需要的能力,选择所有的按钮点击一年剩下的星期六。

单击按钮时,其他月份的天数不在DOM中,因此这些单元格均未被选中。尝试向fullCalendar对象添加一个方法,如果单击了该按钮,则将highlight类添加到.fc sat元素中。使用MomentJS回答了这个问题。