The date returned by date picker is off by one day. Is it a problem in my code or is it a bug?
The date sent to date_picker is 2012-03-21. The date returned by dat
After trying many solutions the following code worked for me taken from (https://stackoverflow.com/a/14006555/1736785)
function createDateAsUTC(date) { return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds())); }