My favorites | Sign in
Project Home Downloads Source
Checkout   Browse   Changes  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!doctype html>
<html lang="en">
<head>
<title>jQuery UI Datepicker - Hover Over Day</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.datepicker.ext.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$("#datepicker").datepicker({
onShow: $.ui.datepicker.hoverCallback(function(date, selectable) {
$("#hoverDate").text(!selectable ? "nothing" :
$.ui.datepicker.formatDate("D d M yyyy", date));
})
});
});
</script>
</head>
<body>

<div class="demo">

<p>Date: <input type="text" id="datepicker">
You're looking at <span id="hoverDate">nothing</span>.</p>

</div><!-- End demo -->

<div class="demo-description">

<p>Extend the datepicker to send callbacks when hovering over a date by wrapping your function
in the built-in <code>hoverCallback</code> and assigning it to the <code>onShow</code> option -
available in the <code>jquery.ui.datepicker.ext.js</code> module.</p>

</div><!-- End demo-description -->

</body>
</html>

Change log

r3875 by kbwood.au on Mar 6, 2010   Diff
Refactor of datepicker
Go to: 

Older revisions

All revisions of this file

File info

Size: 1475 bytes, 41 lines
Powered by Google Project Hosting