#1 — zettwerk.fullcalendar doesn't display some dates
by
Jörg Kubaile
—
last modified
Mar 17, 2012 08:38 AM
| State | Resolved |
|---|---|
| Version: |
—
|
| Area | Functionality |
| Issue type | Bug |
| Severity | Medium |
| Submitted by | Jörg Kubaile |
| Submitted on | Mar 17, 2012 |
| Responsible | Jörg Kubaile |
| Target release: |
—
|
As original reported here by "sean@..": https://dev.plone.org/ticket/12501
I'm using the development version of zettwerk.fullcalendar in Plone 4.1. I have a custom product that imports events via iCal and creates Plone Events for them, and they show up correctly in the fullcalendar_view, but events I manually create within Plone don't show up.
Using Firebug I could see that all events were being retrieved via AJAX, but while the imported events had a timezone of GMT+0 (e.g. "2012/02/18 15:00:00 GMT+0", my export script normalizes timezones), the event created within Plone had a timezone of "US/Eastern" (e.g. "2012/02/21 16:00:00 US/Eastern"), which according to the jQuery FullCalendar documentation (which zettwerk.fullcalendar uses) is not a valid date format.
In the _buildDict function in eventsview.py I changed "str(brain.start)" to "brain.start.ISO()" and it works great now, so that change should probably go into the next release.
Index: zettwerk/fullcalendar/browser/eventsview.py =================================================================== --- zettwerk/fullcalendar/browser/eventsview.py (revision 248295) +++ zettwerk/fullcalendar/browser/eventsview.py (working copy) @@ -89,8 +89,8 @@
if brain.start == brain.end:
allDay = True
jdict = {'title': brain.Title,
'start': str(brain.start),
'end': str(brain.end),
+ 'start': brain.start.ISO(), + 'end': brain.end.ISO(),
'allDay': allDay, 'url': brain.getURL()}
return jdict
I'm using the development version of zettwerk.fullcalendar in Plone 4.1. I have a custom product that imports events via iCal and creates Plone Events for them, and they show up correctly in the fullcalendar_view, but events I manually create within Plone don't show up.
Using Firebug I could see that all events were being retrieved via AJAX, but while the imported events had a timezone of GMT+0 (e.g. "2012/02/18 15:00:00 GMT+0", my export script normalizes timezones), the event created within Plone had a timezone of "US/Eastern" (e.g. "2012/02/21 16:00:00 US/Eastern"), which according to the jQuery FullCalendar documentation (which zettwerk.fullcalendar uses) is not a valid date format.
In the _buildDict function in eventsview.py I changed "str(brain.start)" to "brain.start.ISO()" and it works great now, so that change should probably go into the next release.
Index: zettwerk/fullcalendar/browser/eventsview.py =================================================================== --- zettwerk/fullcalendar/browser/eventsview.py (revision 248295) +++ zettwerk/fullcalendar/browser/eventsview.py (working copy) @@ -89,8 +89,8 @@
if brain.start == brain.end:
allDay = True
jdict = {'title': brain.Title,
'start': str(brain.start),
'end': str(brain.end),
+ 'start': brain.start.ISO(), + 'end': brain.end.ISO(),
'allDay': allDay, 'url': brain.getURL()}
return jdict
Added by
Jörg Kubaile
on
Mar 17, 2012 08:38 AM
Thanks!
Issue state:
Unconfirmed
→
Resolved
No responses can be added.
If you can, please log in before submitting a reaction.
