Hello. Can’t understand what I can do…
Hi,
as I see you use a custom form for editing tasks, can you show the code that you use to create date value from form inputs and assign it to the task object?
Technically you can create date object which would return false from instanceof Date check, e.g. if you create date inside an iframe and then return it to the parent window - such date will be inherited from iframe globals which are different from globals defined in parent window - thus iframeDate instanceof Date would return false.
You can check the explanation here tobyho.com/2011/01/28/checking-t … avascript/ “Cross-window Issues of instanceof”
So, if you use an iframe for tasks popup - that may be the case. As a solution, you could re-create dates in a global window prior to assigning them to the task object:
// inside a parent window:
task.start_date = new Date(iframeTaskStartDate);
Thanks for the tip. I use the