FullCalendar firstDay doesn't work

流过昼夜 提交于 2019-12-25 18:28:21

问题


I am using this code

<script type='text/javascript'>
  $(document).ready(function() {
    $('#calendar').fullCalendar({
      firstDay: 2,
      eventSources: [
        {
          url: 'data.php',
          type: 'POST'
        }
      ]
    })
  });
</script>

but the calendar still starts on Sunday

According to their docs, I am using it right

What is the problem?


回答1:


It's probably an issue with your libraries. Be sure to use the latest version of fullcalendar (2.1.1) and include momentjs.

<link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.1.1/fullcalendar.css" rel="stylesheet">
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.3/moment.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.1.1/fullcalendar.min.js"></script>

Check this working jsfiddle



来源:https://stackoverflow.com/questions/26526280/fullcalendar-firstday-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!