通过ajax进行全日历设置
我想通过ajax 传递完整日历设置(即startTime、endTime)。我想要类似的东西:
eventSources:
[
"events.php",
"settings.php"
]
events.php 保存事件数组,settings.php 保存设置数组。如果这种方法有效,我如何使用设置值?如果settings.php生成json:[{"minTime":"0","maxTime":"17"}],如何将此设置传递给fullcalendar?
谢谢
I would like to pass fullcalendar settings (i.e. startTime, endTime) via ajax. I would like to have something similar to this:
eventSources:
[
"events.php",
"settings.php"
]
where events.php holds events array, settings.php holds settings array. If this approach works, how can i use settings values? If settings.php generates json: [{"minTime":"0","maxTime":"17"}], how to pass this settings to fullcalendar?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许你可以看看这个:
http://www.feyasoft.com/myCalendar
“它能够从 JSON 数据中呈现事件数据的动态日历样式视图”
Maybe you could take a look at this:
http://www.feyasoft.com/myCalendar
"It is capable of rendering dynamic, calendar-style views of event data from JSON data"
您也许可以使用自定义函数来执行类似的操作
http://arshaw.com/fullcalendar/docs/event_data/events_function/
您有一个手动 getJSON 调用,并删除您的设置数据,并仅将事件数据传递给回调。
然而,fullcalendar 的设置在日历加载后还无法修改,所以这是不可能的。
http://code.google.com/p/fullcalendar/issues/ detail?id=293
1.5 版可能会有这个“功能”
you might be able to use a custom function instead to do something like this
http://arshaw.com/fullcalendar/docs/event_data/events_function/
where you have a manual getJSON call, and strip out your settings data, and pass only the event data to the callback.
HOWEVER, fullcalendar's settings cannot yet be modified after the calendar loads, so this would be impossible.
http://code.google.com/p/fullcalendar/issues/detail?id=293
version 1.5 will likely have this "feature"