Team:TU Delft/calendartest

From 2010.igem.org

(Difference between revisions)
Line 5: Line 5:
   <script>
   <script>
   $(document).ready(function() {
   $(document).ready(function() {
 +
 +
jQuery.datePicker.changeMonth = function(){
 +
 +
};
 +
 +
jQuery.datePicker.callback = function(d)
 +
  // get some data for the month containing
 +
  // date(object) d
 +
       
 +
};
 +
 +
     $("#datepicker").datepicker({
     $("#datepicker").datepicker({
       onSelect: function(dateText, inst) {
       onSelect: function(dateText, inst) {
         alert(dateText);
         alert(dateText);
       }
       }
 +
 +
//Kelvin's code initing datePicker
 +
    changeMonth: function(d, e){
 +
        _drawingMonth = true;
 +
        _draw(_getCalendarDiv(d));
 +
        _drawingMonth = false;
 +
 +
// my addition to this func
 +
      if (this.callback){
 +
          this.callback(d);
 +
          //d is a Date object -- the last day of
 +
        //the requested month, IIRC
 +
        }
 +
      },
 +
     });
     });
   });
   });
 +
 +
 +
   </script>
   </script>
</head>
</head>

Revision as of 14:06, 24 June 2010