From c7167979e4ef4a1320175838f2f644602864640b Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 14 Dec 2015 23:47:57 +0000 Subject: [PATCH] Avoid displaying more than 100 days in planner by user or category views (switching from year view), as it results in a sub-optimal user experience --- calendar/js/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/calendar/js/app.js b/calendar/js/app.js index 73a524138d..af0f24d93d 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -3269,7 +3269,8 @@ jQuery.extend(app.classes.calendar,{ { d.setUTCDate(d.getUTCDate() + parseInt(state.planner_days)-1); } - else if (state.last) + // Avoid killing the view by not showing more than 100 days + else if (state.last && (new Date(state.last) - new Date(state.first)) < (100 * 24 * 3600 * 1000) ) { d = new Date(state.last); }