2013-11-29 53 views
1

我正在嘗試開發Android平臺手機的日曆應用程序,使用jQuery手機與Phonegap。 我想在我的應用程序中使用jQuery完整日曆,我已在許多網站中進行搜索。但無法找到確切的解決方案。 我知道必須有一些解決方案來使用jQuery Mobile中的jQuery Full Calendar。 通過看到一些例子,我試圖使用jQuery完全日曆插件,但我無法調用fullCalendar()方法。 <script type="text/javascript" charset="utf-8" src="jquery/jquery-1.3.2.min.js"><script> <script type="text/javascript" charset="utf-8" src="jquery/fullcalendar.js"><script> <script type="text/javascript" charset="utf-8" src="jquery/fullcalendar.min.js"><script>爲Android平臺手機開發完整日曆應用程序,使用jQuery手機與Phonegap

任何人都可以在這幫助我.... ???? 在此先感謝。

+0

CAn您爲此創建了一個小提琴嗎? – Purus

回答

2

最後我解決了這個,感謝Stackoverflow。這是它的工作示例! working jsfiddle

$(document).on('pageshow','#index',function(e,data){  
     var date = new Date(); 
     var d = date.getDate(); 
     var m = date.getMonth(); 
     var y = date.getFullYear(); 

     $('#calendar').fullCalendar({ 
      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/' 
       } 
      ] 
     }); 
    }); 
相關問題