开发者

FullCalendar: Fetching the initial date/time-stamp to show once events are fetched from server

First of all, hats off to Adam for pulling off this wonderful, well-written calendar plugin!

Now for a a very typical use case. Below is what I want to achieve:

  1. Fetch events (URL added to eventSources) from the server side as JSON data. This is all fine and I have been able to achieve th开发者_如何学JAVAis. The events get rendered properly.

  2. USE CASE in question: Once the fetch is completed and BEFORE the events are rendered and shown on the browser, I want to 'fetch' the initial month/date to show to the end user. I was thinking of a separate AJAX request to fetch the timing details from the server side and then use 'gotoDate' to switch the view's date.

The reason for this specific requirement, being that that the end user would like to see all the events and initial view w.r.t the server time. In our application it is possible that the client and the server box are not at all sync'd w.r.t time.

Unfortunately, as yet I am not able to locate any callback method that gets invoked once the event fetch (all relevant events) is complete and 'before' the events get rendered on the view.

Any help here will be appreciated. Please let me know if any further info is required.

Thanks, Mohit


"events" - can process a single event source, this could be an array / JSON feed or function.

"eventSources" - is similar except that it expects multiple event sources, these can also be an array of arrays/functions/JSON feeds (anything that the events option would take).

To process the data before it is rendered I expect you could use a function to do some post processing after you have fetched your data with an AJAX request. See e.g.:

http://arshaw.com/fullcalendar/docs/event_data/events_function/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜