diff --git a/calendar/js/et2_widget_planner.js b/calendar/js/et2_widget_planner.js index d72546013e..0e228717e1 100644 --- a/calendar/js/et2_widget_planner.js +++ b/calendar/js/et2_widget_planner.js @@ -1096,8 +1096,8 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize // Holidays and birthdays var holidays = et2_calendar_daycol.get_holidays(this,date.getUTCFullYear()); - // Pass a number rather than the date object, to make sure it doesn't get changed - this.date_helper.set_value(date.getTime()/1000); + // Pass a string rather than the date object, to make sure it doesn't get changed + this.date_helper.set_value(date.toJSON()); var date_key = ''+this.date_helper.get_year() + sprintf('%02d',this.date_helper.get_month()) + sprintf('%02d',this.date_helper.get_date()); if(holidays && holidays[date_key]) { @@ -1120,9 +1120,9 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize } holidays = holiday_list.join(','); var today = new Date(); - if(date_key === ''+today.getUTCFullYear()+ - sprintf("%02d",today.getUTCMonth()+1)+ - sprintf("%02d",today.getUTCDate()) + if(date_key === ''+today.getFullYear()+ + sprintf("%02d",today.getMonth()+1)+ + sprintf("%02d",today.getDate()) ) { day_class += "calendar_calToday "; @@ -1827,6 +1827,13 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize { // Click on a header, we can go there _ev.data = jQuery.extend({},_ev.target.parentNode.dataset, _ev.target.dataset); + for(var key in _ev.data) + { + if(!_ev.data[key]) + { + delete _ev.data[key]; + } + } // Handle it locally var old_start = this.options.start_date; diff --git a/calendar/js/et2_widget_planner_row.js b/calendar/js/et2_widget_planner_row.js index e73841f5b2..6897ddae61 100644 --- a/calendar/js/et2_widget_planner_row.js +++ b/calendar/js/et2_widget_planner_row.js @@ -189,7 +189,7 @@ var et2_calendar_planner_row = et2_valueWidget.extend([et2_IDetachedDOM], var day_width = 100/days; var t = new Date(start); var content = ''; - for(var left = 0,i = 0; i < days;left += day_width,++i) + for(var i = 0; i < days;i++) { var holidays = []; // TODO: implement this, pull / copy data from et2_widget_timegrid @@ -198,7 +198,7 @@ var et2_calendar_planner_row = et2_valueWidget.extend([et2_IDetachedDOM], if (day_class) // no regular weekday { content += '
'; }