Team:TU Delft/calendartest
From 2010.igem.org
(Difference between revisions)
(New page: <html> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jqu...) |
|||
(7 intermediate revisions not shown) | |||
Line 5: | Line 5: | ||
<script> | <script> | ||
$(document).ready(function() { | $(document).ready(function() { | ||
- | $("#datepicker").datepicker(); | + | |
+ | 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({ | ||
+ | onSelect: function(dateText, inst) { | ||
+ | alert(dateText); | ||
+ | } | ||
+ | }); | ||
}); | }); | ||
+ | |||
+ | |||
+ | |||
</script> | </script> | ||
</head> | </head> |
Latest revision as of 14:12, 24 June 2010