0
votes

I'm getting a valid ISO8601 back from a JSON string, but it's not displayed correct in the fullcalendar.

creating date format with JAVA formatter: SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.sZ") df.setTimeZone(TimeZone.getTimeZone("Europe/Berlin"))

config of calendar:

ignoreTimezone: false, timeFormat=H:mm{ - H:mm}

JSON-Result:

{
    "id":1,
    "title":"Date with Chuck Norris",
    "start":"2011-12-02T09:30:00.0+0100",
    "end":"2011-12-02T10:30:00.0+0100",
    "color":"",
    "allDay":false
}
  • take start-time 9:30 is the DB value but the +0100 is not recognized, so displayed time is 9:30, but that's wrong, must be 10:30. same for end date

...

(to get sure that it will be parsed correctly, I did another thing on config:) eventRender: function(event, element) { event.start = $.fullCalendar.parseDate(event.start); //tried also $.fullCalendar.parseISO8601() event.end = $.fullCalendar.parseDate(event.end); //tried also $.fullCalendar.parseISO8601() }

  • tried with onEventRender and parseDate() but nothing happens

  • tried with onEventRender and parseISO8601() -> but nothing happens and JS-Error (see attachement: js-error.png)

using jquery 1.6.3 and latest fullcalendar 1.5.2

Thank you very much!

Cheers,

Marco

1

1 Answers

0
votes

As per my understanding your date format[2011-12-02T09:30:00.0+0100] means 9:30 in European/Berlin format. I tried creating the event and my system was set to GMT format and it is shown to me as 8:30 in the calendar. If you pass this format and check it in the same timezone(European/berlin),no difference will be seen.