21 |
// build month selector |
// build month selector |
22 |
if (this.sMonth != null) { |
if (this.sMonth != null) { |
23 |
sel = m || this.sMonth.selectedIndex; |
sel = m || this.sMonth.selectedIndex; |
24 |
|
alert(sel); |
25 |
if (sel < 0) sel = this.BaseDate.getMonth(); |
if (sel < 0) sel = this.BaseDate.getMonth(); |
26 |
for (i = 0; i < this.sMonth.options.length; i++) |
for (i = 0; i < this.sMonth.options.length; i++) |
27 |
this.sMonth.options[i] = null; |
this.sMonth.options[i] = null; |
51 |
} |
} |
52 |
this.Check = function(d, m, y) { |
this.Check = function(d, m, y) { |
53 |
var n = new Array(31, -1, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); |
var n = new Array(31, -1, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); |
54 |
m = m || (this.sMonth != null && this.sMonth.options.selectedIndex >= 0) ? |
if (!m) m = (this.sMonth != null && this.sMonth.options.selectedIndex >= 0) ? |
55 |
parseInt(this.sMonth.options[this.sMonth.selectedIndex].value) : this.BaseDate.getMonth() + 1; |
parseInt(this.sMonth.options[this.sMonth.selectedIndex].value) : this.BaseDate.getMonth(); |
56 |
y = y || (this.sYear != null && this.sYear.options.selectedIndex >= 0) ? |
alert(m); |
57 |
|
if (!y) y = (this.sYear != null && this.sYear.options.selectedIndex >= 0) ? |
58 |
parseInt(this.sYear.options[this.sYear.selectedIndex].text) : this.BaseDate.getYear(); |
parseInt(this.sYear.options[this.sYear.selectedIndex].text) : this.BaseDate.getYear(); |
59 |
if (y < 1900) y += 1900; |
if (y < 1900) y += 1900; |
60 |
n[1] = ((y % 4 == 0) && (y % 100 != 0)) ? 29 : 28; |
n[1] = ((y % 4 == 0) && (y % 100 != 0)) ? 29 : 28; |
77 |
} |
} |
78 |
this.nDays = null; |
this.nDays = null; |
79 |
this.Reset(); |
this.Reset(); |
|
this.Check(); |
|
80 |
this.Rebuild(); |
this.Rebuild(); |
81 |
return this; |
return this; |
82 |
} |
} |