完整日历选项不起作用



我正在尝试使用FullCalendar。init函数中的所有选项都不起作用。没有控制台错误,也没有任何反馈。当我尝试使用"页眉"选项时,实际的页眉似乎就消失了!

这是我的HTML:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>VetPro Dashboard</title>
    <!-- Style Css-->
    <link rel="stylesheet" href="../../assets/css/styles.css">
    <link rel="stylesheet" href="../../assets/fonts/fonts.css">
    <link rel="stylesheet" href="../../vendor/bower_components/fullcalendar/dist/fullcalendar.min.css">
    <link rel="stylesheet" href="../../vendor/bower_components/fullcalendar/dist/fullcalendar.print.css">
    <!-- jQuery -->
    <script type="text/javascript" src="../../vendor/bower_components/jquery/dist/jquery.min.js"></script>
    <script type="text/javascript" src="../../vendor/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../../vendor/bower_components/moment/min/moment.min.js"></script>
    <script type="text/javascript" src="../../vendor/bower_components/fullcalendar/dist/fullcalendar.min.js"></script>
    <script type="text/javascript" src="../../assets/javascripts/calendar_scheduler.js"></script>
  </head>
  <body class="split-background">
    <!-- Start Body -->
    <div class="container-fluid" id="vetpro-dashboard">
      <div class="container container-border">
        <div class="col-md-6">
          <div id="calendar">
          </div>
        </div>
        <div class="col-md-6" id="exceptions">
          <div id="scheduler">
            <div id="timepicker">
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- End Body -->
  </body>
</html>

这是我的Javascript:

(function() {
  'use strict';
    $(document).ready(function(){
        // Full calendar
        $('#calendar').fullCalendar({
            header: {
            left: 'prev,next today',
            center: 'title',
            right: 'agendaWeek,agendaDay'
        },
            dayClick: function(date, jsEvent, view) {
        alert('Clicked on: ' + date.format());
        alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
        alert('Current view: ' + view.name);
        // change the day's background color just for fun
        $(this).css('background-color', 'red');
        }
    });

        // Moment.js locale
        moment.locale('en', {
            calendar : {
                lastDay : '[Yesterday]',
                sameDay : '[Today]',
                nextDay : '[Tomorrow]',
                lastWeek : '[last] dddd',
                nextWeek : 'dddd',
                sameElse : 'dddd'
            }
        });
    });
})();

这里怎么了?我该怎么解决这个问题?

谢谢!

文档中似乎没有提到包含"print.css"文件会破坏其他一切。拆下那根线就解决了问题。

相关内容

  • 没有找到相关文章

最新更新