fullCalendar 使用中文

版本:fullcalendar-3.9.0

引入中文語言js文件

<script src="js/plugins/fullcalendar/zh-cn.js"></script>

初始化時加入:locale:'zh-cn',  如下代碼:

 $('#calendar').fullCalendar({
      header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek,agendaDay'
      },
      defaultDate: '2018-03-12',
      navLinks: true, // can click day/week names to navigate views
      selectable: true,
      locale:'zh-cn',
      selectHelper: true
});

即可實現頁面顯示中文。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章