4 |
this.sYear = form.year || form.elements[2] || null; |
this.sYear = form.year || form.elements[2] || null; |
5 |
this.yBefore = before || 0; |
this.yBefore = before || 0; |
6 |
this.yAfter = after || 0; |
this.yAfter = after || 0; |
7 |
this.BaseDate = date || new Date(); |
this.BaseDate = date || null; |
8 |
|
if (!this.BaseDate) { |
9 |
|
this.BaseDate = new Date(); |
10 |
|
this.BaseDate = new Date(this.BaseDate.getYear(), |
11 |
|
this.BaseDate.getMonth() + 1, this.BaseDate.getDate()); |
12 |
|
} else { |
13 |
|
this.BaseDate = new Date(this.BaseDate.getYear(), |
14 |
|
this.BaseDate.getMonth() - 1, this.BaseDate.getDate()); |
15 |
|
} |
16 |
this.Rebuild = function(d, m, y) { |
this.Rebuild = function(d, m, y) { |
17 |
var i, sel; |
var i, sel; |
18 |
// build day selector |
// build day selector |
28 |
} |
} |
29 |
// build month selector |
// build month selector |
30 |
if (this.sMonth != null) { |
if (this.sMonth != null) { |
31 |
sel = m || this.sMonth.selectedIndex; |
sel = (m - 1) || this.sMonth.selectedIndex; |
32 |
if (sel < 0) sel = this.BaseDate.getMonth(); |
if (sel < 0) sel = this.BaseDate.getMonth(); |
33 |
for (i = 0; i < this.sMonth.options.length; i++) |
for (i = 0; i < this.sMonth.options.length; i++) |
34 |
this.sMonth.options[i] = null; |
this.sMonth.options[i] = null; |
76 |
this.Today = function() { |
this.Today = function() { |
77 |
var t = new Date(); |
var t = new Date(); |
78 |
var d = t.getDate() - 1; |
var d = t.getDate() - 1; |
79 |
var m = t.getMonth(); |
var m = t.getMonth() + 1; |
80 |
var y = this.yBefore; |
var y = this.yBefore; |
81 |
this.Check(d, m, y); |
this.Check(d, m, y); |
82 |
|
this.Check(d, m, y); |
83 |
this.Rebuild(d, m, y); |
this.Rebuild(d, m, y); |
84 |
} |
} |
85 |
this.nDays = null; |
this.nDays = null; |
86 |
this.Reset(); |
this.Reset(); |
|
this.Rebuild(); |
|
87 |
return this; |
return this; |
88 |
} |
} |