score:4

Accepted answer

this code actually works fine. the only problem was that i was looking at the _i value of the moment object to check it's value (this is the value used as the initial input when creating the object, not necessarily the current value).

changing the console.log line to the following yields the expected / correct result:

console.log(event.offsetx, valuex.format('yyyy-mm-dd hh:mm:ss'), null, event.offsety, valuey);

Related Query

More Query from same tag