зеркало из https://github.com/mozilla/pjs.git
Fixing bug 189165, problem with checkEndDate if all day event.
This commit is contained in:
Родитель
2af847e133
Коммит
73e7e435da
|
@ -490,7 +490,6 @@ function onOKCommand()
|
||||||
function checkEndTime()
|
function checkEndTime()
|
||||||
{
|
{
|
||||||
var AllDayEvent = getFieldValue( "all-day-event-checkbox", "checked" );
|
var AllDayEvent = getFieldValue( "all-day-event-checkbox", "checked" );
|
||||||
|
|
||||||
if( gEvent.end < gEvent.start && !AllDayEvent )
|
if( gEvent.end < gEvent.start && !AllDayEvent )
|
||||||
{
|
{
|
||||||
return( true );
|
return( true );
|
||||||
|
@ -511,12 +510,16 @@ function checkEndDate()
|
||||||
// Bad to get into floats.
|
// Bad to get into floats.
|
||||||
var startDate = Math.floor(document.getElementById( "start-date-picker" ).value.getTime()/86400000);
|
var startDate = Math.floor(document.getElementById( "start-date-picker" ).value.getTime()/86400000);
|
||||||
var endDate = Math.floor(document.getElementById( "end-date-picker" ).value.getTime()/86400000);
|
var endDate = Math.floor(document.getElementById( "end-date-picker" ).value.getTime()/86400000);
|
||||||
if ( endDate < startDate)
|
|
||||||
|
if( startDate.getFullYear() == endDate.getFullYear() &&
|
||||||
|
startDate.getMonth() == endDate.getMonth() &&
|
||||||
|
startDate.getDay() == endDate.getDay() )
|
||||||
|
return( 0 );
|
||||||
|
|
||||||
|
else if ( endDate < startDate)
|
||||||
return -1;
|
return -1;
|
||||||
else if (endDate > startDate)
|
else if (endDate > startDate)
|
||||||
return 1;
|
return 1;
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkSetTimeDate()
|
function checkSetTimeDate()
|
||||||
|
@ -535,6 +538,7 @@ function checkSetTimeDate()
|
||||||
{
|
{
|
||||||
setDateError(false);
|
setDateError(false);
|
||||||
// start & end same
|
// start & end same
|
||||||
|
alert( "dates are same, check end time is "+CheckEndTime );
|
||||||
setTimeError(CheckEndTime);
|
setTimeError(CheckEndTime);
|
||||||
return !CheckEndTime;
|
return !CheckEndTime;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче