| Issue 401: | IE8 ParseDate issue | |
| 1 person starred this issue and may be notified of changes. | Back to list |
IE8 seems to have an issue with parseDate returning null at the line in the
slicesegs function which contains:
if (eventEnd > start && eventStart < end) {
In IE8, when I add an event, it seems parseDate is intentionally returning
null in both cases, while firefox seems to handle it fine and enters the if
statement, in IE8 it doesn't match the condition so never enters it.
eventEnd and eventStart is NaN in IE8 while in firefox it's set to the date
before and after the event, respectively.
Any idea what I can do to fix this?
Mar 15, 2010
Project Member
#1
adamrs...@gmail.com
Mar 17, 2010
in parseDate:
It seems that immediately after entering the function the value of s in IE is
[object] but typeof checks don't match "object" so it's processed as a string.
within:
if (typeof s == 'string') {
}
The difference seems to come from
return parseISO8601(s, true) || (s ? new Date(s) : null);
parseISO8601 is returning null, so it calls the second part, which seems to fail when
parsing the date.
s is:
Firefox:
Date object which, when JSON.stringify'd = "Tue Mar 02 2010 00:00:00 GMT-0800 (PST)"
IE 8:
"[Object]"
I'm not sure if it's the initial item being [Object] which is causing the problem or
if it's the parsing later on.
Still investigating.
Mar 17, 2010
{"id":"1","title":"","start":"Tue Mar 02 2010 00:00:00 GMT-0800 (PST)"} is the JSON
copy of the event object being passed to fullCalendar
Mar 17, 2010
ok, I think I've figured out what it is. For IE8 when creating the event object I needed to use calEvent.toString() to get a date string. This wasn't necessary for firefox. The way my code was working the date is then stored in a hidden input in the dialog. I then call saveEvent which reads from the dialog's hidden input, and in IE it was being retrieved as, strangely I think, an empty string Object instead of a string containing the date.
Mar 30, 2010
k cool, glad you figure it out
Status:
Done
|
|
| ► Sign in to add a comment |