Team:TU Delft/calendartest
From 2010.igem.org
(Difference between revisions)
(3 intermediate revisions not shown) | |||
Line 6: | Line 6: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
- | jQuery. | + | jQuery.datepicker.callback = function(d) { |
- | + | alert(d); | |
- | + | } | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | } | + | |
//Kelvin's code initing datePicker | //Kelvin's code initing datePicker | ||
- | changeMonth | + | jQuery.datepicker.changeMonth = function(d, e){ |
- | _drawingMonth = true; | + | this._drawingMonth = true; |
- | _draw(_getCalendarDiv(d)); | + | this._draw(this._getCalendarDiv(d)); |
- | _drawingMonth = false; | + | this._drawingMonth = false; |
// my addition to this func | // my addition to this func | ||
+ | alert("changeMonth"); | ||
if (this.callback){ | if (this.callback){ | ||
this.callback(d); | this.callback(d); | ||
//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); | ||
} | } | ||
- | |||
}); | }); | ||
}); | }); |
Latest revision as of 14:12, 24 June 2010