jQuery插件FullCalendar日程表(一)

jQuery插件FullCalendar日程表实现可扩展Google日历功能

jQuery日历FullCalendar插件是一个非常不错的日历工具,可用于制作日程表或计划安排等,可扩展Google日历功能,制作个性化的日程表,同时可绑定点击事件或拖动事件,使用非常方便。

jQuery插件FullCalendar在线实例FullCalendar v1.5.2
http://arshaw.com/fullcalendar/

使用说明
需要使用jQuery库文件和jQuery UI库文件和FullCalendar库文件
http://jquery.com/
http://plugins.jquery.com/project/fullcalendar
http://ui.jquery.com/

同进需要使用fullcalendar.css文件

使用实例
一,导入css样式和js
fullcalendar
的样式表:
<link rel='stylesheet' type='text/css' href='redmond/theme.css' />

<link rel='stylesheet' type='text/css' href='../fullcalendar.css' />
fullcalendar
插件的基础:

<script type='text/javascript' src='../jquery/jquery.js'></script>

<script type='text/javascript' src='../jquery/ui.core.js'></script>

<script type='text/javascript' src='../jquery/ui.draggable.js'></script>

<script type='text/javascript' src='../jquery/ui.resizable.js'></script>
fullcalendar
插件的js

<script type='text/javascript' src='../fullcalendar.min.js'></script>

二页面加载初始化fullcalendar
<script type='text/javascript'>

 

    $(document).ready(function() {

   

       var date = new Date();

       var d = date.getDate();

       var m = date.getMonth();

       var y = date.getFullYear();

      

       $('#calendar').fullCalendar({

           header: {

              left: 'prev,next today',

              center: 'title',

              right: 'month,agendaWeek,agendaDay'

           },

           editable: true,

           events: [

              {

                  title: 'All Day Event',

                  start: new Date(y, m, 1)

              },

              {

                  title: 'Long Event',

                  start: new Date(y, m, d-5),

                  end: new Date(y, m, d-2)

              },

              {

                  id: 999,

                  title: 'Repeating Event',

                  start: new Date(y, m, d-3, 16, 0),

                  allDay: false

              },

              {

                  id: 999,

                  title: 'Repeating Event',

                  start: new Date(y, m, d+4, 16, 0),

                  allDay: false

              },

              {

                  title: 'Meeting',

                  start: new Date(y, m, d, 10, 30),

                  allDay: false

              },

              {

                  title: 'Lunch',

                  start: new Date(y, m, d, 12, 0),

                  end: new Date(y, m, d, 14, 0),

                  allDay: false

              },

              {

                  title: 'Birthday Party',

                  start: new Date(y, m, d+1, 19, 0),

                  end: new Date(y, m, d+1, 22, 30),

                  allDay: false

              },

              {

                  title: 'Click for Google',

                  start: new Date(y, m, 28),

                  end: new Date(y, m, 29),

                  url: 'http://google.com/'

              }

           ]

       });

      

    });

 

</script>

<style type='text/css'>

 

    body {

       margin-top: 40px;

       text-align: center;

       font-size: 14px;

       font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;

       }

 

    #calendar {

       width: 900px;

       margin: 0 auto;

       }

 

</style>
三添加fullcaledar容器

<div id='calendar'></div>

 

你可能感兴趣的:(fullCalendar)