From 211d3a54389555fb0d53efff59d9e18cae4ca9a1 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 4 Apr 2016 22:06:01 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20drag=20and=20drop=20across=20some=20month?= =?UTF-8?q?s=20could=20change=20event=20to=20the=20wrong=20(=C2=B1=201)=20?= =?UTF-8?q?month=20-=20now=20works=20with=20any=20date=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- calendar/js/et2_widget_timegrid.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/calendar/js/et2_widget_timegrid.js b/calendar/js/et2_widget_timegrid.js index 0c120f9196..94825c1451 100644 --- a/calendar/js/et2_widget_timegrid.js +++ b/calendar/js/et2_widget_timegrid.js @@ -412,7 +412,11 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view. } if(event_widget) { - event_widget._parent.date_helper.set_value(drop_date.substring(0,4)+'-'+drop_date.substring(4,6)+'-'+drop_date.substring(6,8)); + // Send full string to avoid rollover between months using set_month() + event_widget._parent.date_helper.set_value( + drop_date.substring(0,4)+'-'+drop_date.substring(4,6)+'-'+drop_date.substring(6,8)+ + 'T00:00:00Z' + ); // Make sure whole day events stay as whole day events by ignoring drop time