mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +01:00
* Calendar - avoid events ending at midnight (00:00) causing a 0 length event the next morning
This commit is contained in:
parent
cc3e8f08ce
commit
02a569bea9
@ -3017,7 +3017,9 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
|
|||||||
start: typeof record.data.start === 'string' ? record.data.start : record.data.start.toJSON(),
|
start: typeof record.data.start === 'string' ? record.data.start : record.data.start.toJSON(),
|
||||||
end: typeof record.data.end === 'string' ? record.data.end : record.data.end.toJSON()
|
end: typeof record.data.end === 'string' ? record.data.end : record.data.end.toJSON()
|
||||||
};
|
};
|
||||||
if(dates.start.substr(0,10) !== dates.end.substr(0,10))
|
if(dates.start.substr(0,10) !== dates.end.substr(0,10) &&
|
||||||
|
// Avoid events ending at midnight having a 0 length event the next day
|
||||||
|
dates.end.substr(11,8) !== '00:00:00')
|
||||||
{
|
{
|
||||||
var end = new Date(Math.min(new Date(record.data.end), new Date(state.last)));
|
var end = new Date(Math.min(new Date(record.data.end), new Date(state.last)));
|
||||||
end.setUTCHours(23);
|
end.setUTCHours(23);
|
||||||
|
Loading…
Reference in New Issue
Block a user