aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/dialogs/event-page.c8
-rw-r--r--calendar/gui/dialogs/schedule-page.c7
2 files changed, 13 insertions, 2 deletions
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index a7e1655c5a..384a39c419 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -286,7 +286,7 @@ static void
update_time (EventPage *epage, CalComponentDateTime *start_date, CalComponentDateTime *end_date)
{
EventPagePrivate *priv;
- struct icaltimetype *start_tt, *end_tt;
+ struct icaltimetype *start_tt, *end_tt, implied_tt;
icaltimezone *start_zone = NULL, *end_zone = NULL;
CalClientGetStatus status;
gboolean all_day_event;
@@ -323,6 +323,12 @@ update_time (EventPage *epage, CalComponentDateTime *start_date, CalComponentDat
all_day_event = FALSE;
start_tt = start_date->value;
end_tt = end_date->value;
+ if (!end_tt && start_tt->is_date) {
+ end_tt = &implied_tt;
+ *end_tt = *start_tt;
+ icaltime_adjust (end_tt, 1, 0, 0, 0);
+ }
+
if (start_tt->is_date && end_tt->is_date) {
all_day_event = TRUE;
if (icaltime_compare_date_only (*end_tt, *start_tt) > 0) {
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index b062088bc8..97029704a2 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -236,7 +236,12 @@ update_time (SchedulePage *spage, CalComponentDateTime *start_date, CalComponent
}
start_tt = *start_date->value;
- end_tt = *end_date->value;
+ if (!end_date->value && start_tt.is_date) {
+ end_tt = start_tt;
+ icaltime_adjust (&end_tt, 1, 0, 0, 0);
+ } else {
+ end_tt = *end_date->value;
+ }
/* If the end zone is not the same as the start zone, we convert it. */
priv->zone = start_zone;