Fix some months not showing enough weeks, better this time

This commit is contained in:
Nathan Gray 2016-01-21 15:40:32 +00:00
parent 0b7c76856a
commit ad05ac0cc3

View File

@ -3570,11 +3570,9 @@ jQuery.extend(app.classes.calendar,{
},
end_date: function(state) {
var d = app.calendar.View.end_date.call(this,state);
d = new Date(d.getFullYear(),d.getUTCMonth() + 1, 0,0,0,0);
var week_start = app.calendar.date.start_of_week(d);
if(week_start < d) week_start.setUTCHours(24*7);
week_start.setUTCSeconds(week_start.getUTCSeconds()-1);
return week_start;
d = new Date(d.getFullYear(),d.getUTCMonth() + 1, 1,0,-d.getTimezoneOffset(),0);
d.setUTCSeconds(d.getUTCSeconds()-1);
return app.calendar.date.end_of_week(d);
},
granularity: function(state) {
// Always a list, not a grid