public
Description: Date Input is a no frills date picker plugin for jQuery
Homepage:
Clone URL: git://github.com/jonleighton/date_input.git
Solve weird issue with duplicate and missing days in certain time zones (bug 
2984, thanks to Arsenicus)
jonleighton (author)
Sat Nov 01 12:58:07 -0700 2008
commit  8931219512e91c4862b6b3eb7a913ec26e66e370
tree    fa16a4e60a6debe5eb036bbdb5fe95ebc1ece0f9
parent  c48afeee68926f0f8c7ac26095b41c4da82a1858
...
53
54
55
56
 
57
58
59
...
119
120
121
122
 
123
124
125
...
53
54
55
 
56
57
58
59
...
119
120
121
 
122
123
124
125
0
@@ -53,7 +53,7 @@ DateInput.prototype = {
0
     var dayCells = "";
0
     
0
     for (var i = 0; i <= numDays; i++) {
0
-      var currentDay = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate() + i);
0
+      var currentDay = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate() + i, 12, 00);
0
       
0
       if (this.isFirstDayOfWeek(currentDay)) dayCells += "<tr>";
0
       
0
@@ -119,7 +119,7 @@ DateInput.prototype = {
0
   stringToDate: function(string) {
0
     var matches;
0
     if (matches = string.match(/^(\d{1,2}) ([^\s]+) (\d{4,4})$/)) {
0
-      return new Date(matches[3], this.shortMonthNum(matches[2]), matches[1]);
0
+      return new Date(matches[3], this.shortMonthNum(matches[2]), matches[1], 12, 00);
0
     } else {
0
       return null;
0
     };

Comments