Fix incorrect tooltip in planner if event did not start or end on the hour

This commit is contained in:
nathangray 2016-09-08 08:50:26 -06:00
parent 36995ed95b
commit b03d71379a
2 changed files with 4 additions and 4 deletions

View File

@ -885,13 +885,13 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
{
event.end = new Date(event.end);
}
event['start_m'] = parseInt((event.start.valueOf()/1000 - day_start) / 60);
event['start_m'] = event.start.getUTCHours() * 60 + event.start.getUTCMinutes();
if (event['start_m'] < 0)
{
event['start_m'] = 0;
event['multiday'] = true;
}
event['end_m'] = parseInt((event.end.valueOf()/1000 - day_start) / 60);
event['end_m'] = event.end.getUTCHours() * 60 + event.end.getUTCMinutes();
if (event['end_m'] >= 24*60)
{
event['end_m'] = 24*60-1;

View File

@ -576,13 +576,13 @@ var et2_calendar_planner_row = (function(){ "use strict"; return et2_valueWidget
day_start -= daylight_diff;
}
event['start_m'] = parseInt((event.start.valueOf()/1000 - day_start) / 60);
event['start_m'] = event.start.getUTCHours() * 60 + event.start.getUTCMinutes();
if (event['start_m'] < 0)
{
event['start_m'] = 0;
event['multiday'] = true;
}
event['end_m'] = parseInt((event.end.valueOf()/1000 - day_start) / 60);
event['end_m'] = event.end.getUTCHours() * 60 + event.end.getUTCMinutes();
if (event['end_m'] >= 24*60)
{
event['end_m'] = 24*60-1;