Commits

Matthew Schinckel committed 786dc32

Another attempted fix for FF date changes.

  • Participants
  • Parent commits 6fbc880

Comments (0)

Files changed (2)

examples/datepicker.html

 		<div data-bind="messages: {}"></div>
 		
     <form>
-  		<!-- <input type="text" data-bind="date: theDate, dateOptions: {displayFormat:dateFormat}">
+  		<input type="text" data-bind="date: theDate, dateOptions: {displayFormat:dateFormat}">
 		
   		<input name="date" type="text" data-bind="date: theDate, 
   											dateOptions: {
   												displayFormat: '%-d %b, %Y',
                           yearRange: 'c-5:c+5',
   												maxDate: '2015-01-01'
-                        }"> -->
+                        }">
       <input type="text" data-bind="date: theDate">
   		<input type="text" data-bind="time: theDate">
     </form>

src/js/datepicker.js

     // Calculate the weeks that should be shown for the currently visible month.
     datepicker.visibleWeeks = ko.dependentObservable({read: function visibleWeeks(){
       var visibleWeeks = [];
-      // For some reason, FF does not correctly update visibleMonth()/visibleYear().
-      visibleDate();
       var month = Number(datepicker.visibleMonth());
       var year = Number(datepicker.visibleYear());
       var date = value();
       });
       
       return visibleWeeks;
-    }, deferEvaluation: true});
+    }, deferEvaluation: false});
     
     /* Event handlers. Note that these use the new ko2.0 syntax */
     // Change the display to the previous calendar month.