зеркало из https://github.com/mozilla/pjs.git
bug 360821 - Don't fail when attempting to create an event before showing the calendar view. Patch by Joey Minta <jminta@gmail.com>, r1=ctalbert, r2=lilmatt
This commit is contained in:
Родитель
ef743910de
Коммит
30d2531b86
|
@ -55,7 +55,12 @@ function createEventWithDialog(calendar, startDate, endDate, summary, event)
|
|||
event = createEvent();
|
||||
|
||||
if (!startDate) {
|
||||
startDate = currentView().selectedDay.clone();
|
||||
// Have we shown the calendar view yet? (Lightning)
|
||||
if (currentView().initialized) {
|
||||
startDate = currentView().selectedDay.clone();
|
||||
} else {
|
||||
startDate = jsDateToDateTime(new Date()).getInTimezone(kDefaultTimezone);
|
||||
}
|
||||
startDate.isDate = true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче