Home Unanswered Active Tags New Question

Problem with e.start() and e.end() with EventClick and javascript

Hi,

I'm trying to open a new popup window with the click event and trying to send start hour/minutes and end hour/minutes as params. The problem is that all those hours that the (e) gives seem to be 2 hours late. Well I'll get them from db for now with the value id. Just thought of reporting a possible problem.

Asked by Anonymous 4 years ago.
Replies
You need to access the dates using getUTC...() methods of the JavaScript Date object. These methods will give you the same date&time as the local date&time on the server. This is not very straightforward but it was necessary because IE and FF handle the summer time differently and it was causing problems.

This is a change introduced in DayPilot Pro 3.9.
Comment posted by Dan Letecky 4 years ago.
Ok. getUTCHours() and getUTCMinutes() produce the correct times. Thanks for the quick reply.
Comment posted by Anonymous 4 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java