diff --git a/src/commands/CmdCalendar.cpp b/src/commands/CmdCalendar.cpp index e4dec6985..34cce6ff2 100644 --- a/src/commands/CmdCalendar.cpp +++ b/src/commands/CmdCalendar.cpp @@ -187,8 +187,12 @@ int CmdCalendar::execute (std::string& output) } } } - mFrom = oldest.month(); - yFrom = oldest.year(); + + // Default to current month if no due date is present + if (oldest != Datetime (9999, 12, 31)) { + mFrom = oldest.month(); + yFrom = oldest.year(); + } } if (Context::getContext ().config.getBoolean ("calendar.offset"))