2008-09-20 17:42:04 +00:00
|
|
|
<!doctype html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<title>Simple Datepicker</title>
|
2008-12-13 08:35:02 +00:00
|
|
|
<link rel="stylesheet" href="all.css" type="text/css">
|
2008-12-13 09:53:02 +00:00
|
|
|
<link rel="stylesheet" href="../../themes/base/ui.all.css" type="text/css">
|
2009-01-22 09:13:28 +00:00
|
|
|
<script type="text/javascript" src="../../jquery-1.3.1.js"></script>
|
2008-09-20 17:42:04 +00:00
|
|
|
<script type="text/javascript" src="../../ui/ui.core.js"></script>
|
|
|
|
<script type="text/javascript" src="../../ui/ui.datepicker.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function() {
|
2008-12-22 15:47:35 +00:00
|
|
|
// simple datepicker
|
2008-12-19 22:43:11 +00:00
|
|
|
$('#d1').datepicker();
|
2008-12-22 15:47:35 +00:00
|
|
|
$('button.disable-d1').click(function(event){
|
|
|
|
$('#d1').datepicker('disable');
|
|
|
|
event.preventDefault();
|
|
|
|
});
|
|
|
|
$('button.enable-d1').click(function(event){
|
|
|
|
$('#d1').datepicker('enable');
|
|
|
|
event.preventDefault();
|
|
|
|
});
|
|
|
|
$('button.destroy-d1').click(function(event){
|
|
|
|
$('#d1').datepicker('destroy');
|
|
|
|
event.preventDefault();
|
|
|
|
});
|
|
|
|
|
|
|
|
// multi datepicker
|
2008-12-19 22:43:11 +00:00
|
|
|
$('#d2').datepicker({numberOfMonths: 3, showButtonPanel: true});
|
2008-12-22 15:47:35 +00:00
|
|
|
$('button.disable-d2').click(function(event){
|
|
|
|
$('#d2').datepicker('disable');
|
|
|
|
event.preventDefault();
|
|
|
|
});
|
|
|
|
$('button.enable-d2').click(function(event){
|
|
|
|
$('#d2').datepicker('enable');
|
|
|
|
event.preventDefault();
|
|
|
|
});
|
|
|
|
$('button.destroy-d2').click(function(event){
|
|
|
|
$('#d2').datepicker('destroy');
|
|
|
|
event.preventDefault();
|
|
|
|
});
|
|
|
|
|
|
|
|
// inline datepicker
|
2009-01-08 06:50:51 +00:00
|
|
|
$('#inl').datepicker({minDate: -20, maxDate: '+1M +10D'});
|
2008-12-22 15:47:35 +00:00
|
|
|
$('button.disable-inl').click(function(event){
|
|
|
|
$('#inl').datepicker('disable');
|
|
|
|
event.preventDefault();
|
|
|
|
});
|
|
|
|
$('button.enable-inl').click(function(event){
|
|
|
|
$('#inl').datepicker('enable');
|
|
|
|
event.preventDefault();
|
|
|
|
});
|
|
|
|
$('button.destroy-inl').click(function(event){
|
|
|
|
$('#inl').datepicker('destroy');
|
|
|
|
event.preventDefault();
|
|
|
|
});
|
2009-01-04 13:43:01 +00:00
|
|
|
|
|
|
|
// disabled input datepicker
|
|
|
|
$('#d3').datepicker();
|
2009-01-04 15:13:01 +00:00
|
|
|
|
|
|
|
// bottom-right datepicker
|
|
|
|
$('#d4').datepicker({numberOfMonths: 3});
|
2008-09-20 17:42:04 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<ul class="plugins">
|
2008-12-19 22:43:11 +00:00
|
|
|
<li class="plugin">
|
2008-12-22 15:47:35 +00:00
|
|
|
<button class="disable-d1">Disable</button>
|
|
|
|
<button class="enable-d1">Enable</button>
|
|
|
|
<button class="destroy-d1">Destroy</button>
|
|
|
|
|
2008-12-19 22:43:11 +00:00
|
|
|
Datepicker Simple
|
|
|
|
<div>
|
2009-01-04 14:16:40 +00:00
|
|
|
<input type="text" id="d1" />
|
2008-12-19 22:43:11 +00:00
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li class="plugin">
|
2008-12-22 15:47:35 +00:00
|
|
|
<button class="disable-d2">Disable</button>
|
|
|
|
<button class="enable-d2">Enable</button>
|
|
|
|
<button class="destroy-d2">Destroy</button>
|
|
|
|
|
2008-12-19 22:43:11 +00:00
|
|
|
Datepicker Multi
|
|
|
|
<div>
|
2009-01-04 14:16:40 +00:00
|
|
|
<input type="text" id="d2" />
|
2008-12-19 22:43:11 +00:00
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li class="plugin">
|
2008-12-22 15:47:35 +00:00
|
|
|
<button class="disable-inl">Disable</button>
|
|
|
|
<button class="enable-inl">Enable</button>
|
|
|
|
<button class="destroy-inl">Destroy</button>
|
|
|
|
|
2008-12-19 22:43:11 +00:00
|
|
|
Datepicker Inline
|
|
|
|
<div id="inl"></div>
|
|
|
|
</li>
|
2009-01-04 13:43:01 +00:00
|
|
|
<li class="plugin">
|
|
|
|
Datepicker disabled input
|
|
|
|
<div>
|
2009-01-04 14:16:40 +00:00
|
|
|
<input type="text" id="d3" disabled="disabled" />
|
2009-01-04 13:43:01 +00:00
|
|
|
</div>
|
2009-01-04 15:13:01 +00:00
|
|
|
</li>
|
|
|
|
<li class="plugin" style="position: absolute; right: 0; bottom: 0; height: 40px">
|
|
|
|
Datepicker - positioned bottom-right
|
|
|
|
<div>
|
|
|
|
<input type="text" id="d4">
|
|
|
|
</div>
|
2009-01-04 13:43:01 +00:00
|
|
|
</li>
|
2008-09-20 17:42:04 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|