Team:TU Delft/calendartest

From 2010.igem.org

(Difference between revisions)
Line 6: Line 6:
   $(document).ready(function() {
   $(document).ready(function() {
-
    $("#datepicker").datepicker({
+
      jQuery.datepicker.callback = function(d) {
-
      onSelect: function(dateText, inst) {
+
-
        alert(dateText);
+
-
      },
+
-
 
+
-
      callback: function(d) {
+
       alert(d);
       alert(d);
-
       },
+
       }
//Kelvin's code initing datePicker
//Kelvin's code initing datePicker
-
     changeMonth: function(d, e){
+
     jQuery.datepicker.changeMonth = function(d, e){
         _drawingMonth = true;
         _drawingMonth = true;
         _draw(_getCalendarDiv(d));
         _draw(_getCalendarDiv(d));
Line 27: Line 22:
           //d is a Date object -- the last day of
           //d is a Date object -- the last day of
         //the requested month, IIRC
         //the requested month, IIRC
-
        }
+
      }
-
      }
+
    }
 +
 +
    $("#datepicker").datepicker({
 +
      onSelect: function(dateText, inst) {
 +
        alert(dateText);
 +
      }
     });
     });
   });
   });

Revision as of 14:11, 24 June 2010