/[health_html]/js/DateSelector.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /js/DateSelector.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by ravilov, Fri Sep 7 15:07:17 2001 UTC revision 1.2 by ravilov, Wed Sep 19 12:23:57 2001 UTC
# Line 21  function DateSelector(form, date, before Line 21  function DateSelector(form, date, before
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;
# Line 50  function DateSelector(form, date, before Line 51  function DateSelector(form, date, before
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;
# Line 75  function DateSelector(form, date, before Line 77  function DateSelector(form, date, before
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  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.26