CodeIgniter Forums
For js_calendar_pi - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: For js_calendar_pi (/showthread.php?tid=26746)



For js_calendar_pi - El Forum - 01-22-2010

[eluser]Unknown[/eluser]
Code:
selDate = (last_date != '') ? last_date : this.date;

var _monarr = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
if (((this.year % 4 == 0) && (this.year % 100 != 0)) || (this.year % 400 == 0)) _monarr[1] = 29;
var _max_day_number = this.firstDay + _monarr[this.month];    
for (j = 0; j < _max_day_number; j++)
{}

OK, i add some code into js calendar file whith is in plugins folder of CI.

I think this is better than old.