javascript - full calender not working in firefox -
hi i'm working on full calender have problem displaying values in mozilla firefox. in chrome code works perfectly.
i'm fetching value database , displaying it, of i'm using following static values input.
var abc = new array(); abc =[{addednew: false,allday: false,end: "mon may 13 2013 7:30:00 gmt 0530 (india standard time)",geta_id: "72",id: "[_fc1_3 ",start: "mon may 13 2013 6:30:00 gmt 0530 (india standard time)",title: "mon"}];
chrome screenshoot - using static values
firefox screenshoot - using static values
the values in console correct in chrome , firefox
i don't know i'm going wrong or problem firefox.
the input date strings calendar have not standard format (according plugin's documentation):
'mon may 13 2013 7:30:00 gmt 0530 (india standard time)' (your format) 'mon, 13 may 2013 7:30:00 gmt' (expected format)
because not expert regular expressions, can propose following (working) fix:
var abc = [{addednew: false,allday: false,end: "mon may 13 2013 7:30:00 gmt 0530 (india standard time)",geta_id: "72",id: "[_fc1_3 ",start: "mon may 13 2013 6:30:00 gmt 0530 (india standard time)",title: "mon"}]; abc.map(function(item){ var t = item.end.split(' '); item.end = [t[0]+',', t[2], t[1], t[3], t[4], t[5]].join(' '); t = item.start.split(' '); item.start = [t[0]+',', t[2], t[1], t[3], t[4], t[5]].join(' '); return item; });
Comments
Post a Comment