[Seaside] IE issue on FullCalendar using #eventsJsonGet

Brian Murphy-Dye brian at murphydye.com
Fri Dec 9 20:46:06 UTC 2011


I finally got to the point I needed to test my app on Internet Explorer and
of course had problems! It turns out that for #eventsJsonGet: is given
different values depending on the browser:

Safari sends:: 'Mon Nov 28 2011 00:00:00 GMT-0700 (MST)'
IE sends:: 'Mon Nov 28 00:00:00 MST 2011'

There may be a better way to accommodate this difference, but it works by
slightly modifying the #fromFullCalendar method as such:

JQFullCalendar>>fromFullCalendar: aString
| tokens hms offset yr |
tokens := aString findTokens: ' '.
 tokens fourth size = 4
ifTrue:
[hms := (tokens at: 5) findTokens: ':'.
 offset := Duration
days: 0
hours: ((tokens at: 6) copyFrom: 5 to: 6) asNumber
 minutes: ((tokens at: 6) copyFrom: 7 to: 8) asNumber
seconds: 0.
yr := tokens fourth]
 ifFalse:
[hms := (tokens at: 4) findTokens: ':'.
offset := Duration new.
 yr := tokens sixth].
^ self
year: yr asNumber
 month: (tokens at: 2)
day: (tokens at: 3) asNumber
hour: (hms at: 1) asNumber
 minute: (hms at: 2) asNumber
second: (hms at: 3) asNumber
nanoSecond: 0
 offset: offset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20111209/fde206bd/attachment.htm


More information about the seaside mailing list