完整的日历错误时间在点击事件谷歌日历



我需要让谷歌日历对客户来说看起来不错,所以我使用了Fullcalendar,现在看起来很棒,谢谢!不过我有一个问题:当我单击某个事件时,详细信息会显示 GMT 时间。我尝试了一些方法,但我绝对不是开发人员,所以我需要帮助:)

任何帮助将不胜感激!这是我到目前为止的js代码:

$(document).ready(function() {
    $('#calendar').fullCalendar({
        theme: true,
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },
        googleCalendarApiKey: 'my api key',
        events: 'my event',
        eventClick: function(event) {
            // opens events in a popup window
            window.open(event.url, 'gcalevent', 'width=600,height=400');
            return false;
            $scope.start = event;
        },
        loading: function(bool) {
            $('#loading').toggle(bool);
        }
    }); 
});
$(document).ready(function() {
    $('#calendar').fullCalendar({
        events: function(start, end, timezone, callback) {
            $.ajax({
               url: 'my calendar xml link',
               dataType: 'xml',
               data: {
                   start: start.unix(),
                   end: end.unix()
               },
               success: function(doc) {
                   var events = [];
                   $(doc).find('event').each(function() {
                       events.push({
                           title: $(this).attr('title'),
                           start: $(this).attr('start') // will be parsed
                       });
                   });
                   callback(events);
               }
           });
        }, 
        theme: true,
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },
        googleCalendarApiKey: 'my api key',
        events: 'my calendar id',
        eventClick: function(event) {
            // opens events in a popup window

            window.open(event.url, 'gcalevent', 'width=600,height=400');
            return false;
            $scope.start = event;
        },
        loading: function(bool) {
            $('#loading').toggle(bool);
        }   
    });
});

相关内容

  • 没有找到相关文章

最新更新