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:
mattwillis%gmail.com 2007-03-07 18:29:23 +00:00
Родитель ef743910de
Коммит 30d2531b86
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -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;
}