Team:TU Delft/calendartest

From 2010.igem.org

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

Latest revision as of 14:12, 24 June 2010