hermit
January 18, 2011, 12:24am
#1
Hi
I am converting UTC date coming from DB to local time using
var convertDateFromDB = scheduler.date.date_to_str("%Y-%m-%d %H:%i", true);
Using this gives me an error
date.getUTCFullYear is not a function dhtmlxscheduler_debug.js Line 2515.
is this a known bug or am I going wrong somewhere?
You are using date_to_str - are you sure that you need not use str_to_date instead ?
Server side data most probably was provided as string, and to get data object you need to use str_to_date
hermit
January 19, 2011, 7:33pm
#3
Yes i am using str_to_date now but now i am getting the error
date.split is not a function
localhost:2238/js/dhtmlxSchedule … r_debug.js
Line 2550
The date from the DB is in the format “u” of the standard datetime formats from msdn library.
Can you provide some kind of sample or link to the page where issue occurs?
Above error can occur if you are provide null or undefined value to the conversion function, not quite sure how it can occurs in real app.