IE issue on FullCalendar using #eventsJsonGet

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

IE issue on FullCalendar using #eventsJsonGet

Brian M
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

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside