Calendar bugs:

- Fix infinite loop east of GMT
This commit is contained in:
Nathan Gray 2015-09-14 18:29:22 +00:00
parent 591f55e3d7
commit 7d83c27684

View File

@ -775,7 +775,10 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize
var day_width = 100 / days;
for(var t = new Date(start),left = 0,i = 0; i < days; t.setUTCDate(t.getUTCDate() + days_in_month),left += days_in_month*day_width,i += days_in_month)
{
days_in_month = new Date(t.getUTCFullYear(),t.getUTCMonth()+1,0).getUTCDate() - (t.getUTCDate()-1);
this.date_helper.set_year(t.getUTCFullYear());
this.date_helper.set_month(t.getUTCMonth()+1);
this.date_helper.set_date(0);
days_in_month = this.date_helper.get_date() - (t.getUTCDate()-1);
if (i + days_in_month > days)
{