Welcome,
Guest
|
|
When ading a new event, in function getDateFromStrings(dateString, timeString) I am experiencing a problem where by the incorrect date is returned
function getDateFromStrings(dateString, timeString) { alert("gdfs1: "+dateString) var dt = (timeString == "") ? new Date() : parseTime(timeString); var tempDate = UTC.parseDateString(dateString); alert("gdfs2: "+tempDate) dt.setMonth(tempDate.getMonth()); dt.setYear(tempDate.getYear()); dt.setDate(tempDate.getDate()); return dt; } The first alert display the correct date: "4/1/2010".The second alert displai "1 May 2010" This is only true for April. March dates are added fine, and sou are May...all April date get returned as May... Please help/advise.. Version 1.2.9 Nic Oosthuizen |
Please Log in to join the conversation.
Last edit: by nicoos.
|
|
I use the premium version and I don't see this issue. But my suggestion is don't rely on utc code of web2cal and instead try using datejs or any other external library to do your parsing. Even better, simply create new date(year, m,d, and so on)
try datejs.com that has some useful parsing functionality. Rags |
Please Log in to join the conversation. |