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

This commit is contained in:
Nathan Gray 2015-12-14 23:47:57 +00:00
parent fdfad272aa
commit c7167979e4

View File

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