2013-11-03 10:35:38 +00:00
|
|
|
<html>
|
|
|
|
<link rel="stylesheet" type="text/css" href="jquery.datetimepicker.css"/>
|
|
|
|
<body>
|
2013-11-07 04:24:58 +00:00
|
|
|
<h3>DateTimePicker</h3>
|
|
|
|
<input type="text" value="2014/03/15 05:06" id="datetimepicker"/><br><br>
|
|
|
|
<h3>TimePicker</h3>
|
|
|
|
<input type="text" id="datetimepicker1"/><br><br>
|
|
|
|
<h3>DatePicker</h3>
|
|
|
|
<input type="text" id="datetimepicker2"/><br><br>
|
|
|
|
<h3>Inline DateTimePicker</h3>
|
|
|
|
<input type="text" id="datetimepicker3"/><br><br>
|
|
|
|
<h3>Button Trigger</h3>
|
|
|
|
<input type="text" id="datetimepicker4"/><input id="open" type="button" value="open"/><input id="close" type="button" value="close"/>
|
2013-11-15 06:47:44 +00:00
|
|
|
<h3>TimePicker allows time</h3>
|
|
|
|
<input type="text" id="datetimepicker5"/><br><br>
|
2013-11-19 09:20:05 +00:00
|
|
|
<h3>Destroy DateTimePicker</h3>
|
|
|
|
<input type="text" id="datetimepicker6"/><input id="destroy" type="button" value="destroy"/>
|
2013-11-03 10:35:38 +00:00
|
|
|
</body>
|
|
|
|
<script src="jquery.js"></script>
|
|
|
|
<script src="jquery.datetimepicker.js"></script>
|
|
|
|
<script>
|
|
|
|
$('#datetimepicker').datetimepicker();
|
|
|
|
$('#datetimepicker').datetimepicker({value:'2015/04/15 05:06'});
|
|
|
|
$('#datetimepicker1').datetimepicker({
|
|
|
|
datepicker:false,
|
|
|
|
format:'H:i',
|
2013-11-06 08:52:16 +00:00
|
|
|
step:5,
|
2013-11-03 10:35:38 +00:00
|
|
|
});
|
|
|
|
$('#datetimepicker2').datetimepicker({
|
|
|
|
timepicker:false,
|
|
|
|
format:'d/m/Y',
|
2013-11-18 09:52:22 +00:00
|
|
|
minDate:0,
|
2013-11-03 10:35:38 +00:00
|
|
|
});
|
|
|
|
$('#datetimepicker3').datetimepicker({
|
|
|
|
inline:true,
|
|
|
|
});
|
2013-11-07 04:24:58 +00:00
|
|
|
$('#datetimepicker4').datetimepicker();
|
|
|
|
$('#open').click(function(){
|
|
|
|
$('#datetimepicker4').datetimepicker('show');
|
|
|
|
});
|
|
|
|
$('#close').click(function(){
|
|
|
|
$('#datetimepicker4').datetimepicker('hide');
|
|
|
|
});
|
2013-11-15 06:47:44 +00:00
|
|
|
$('#datetimepicker5').datetimepicker({
|
|
|
|
datepicker:false,
|
|
|
|
allowTimes:['12:00','13:00','15:00','17:00','17:05','17:20','19:00','20:00'],
|
|
|
|
});
|
2013-11-19 09:20:05 +00:00
|
|
|
$('#datetimepicker6').datetimepicker();
|
|
|
|
$('#destroy').click(function(){
|
|
|
|
if( $('#datetimepicker6').data('xdsoft_datetimepicker') ){
|
|
|
|
$('#datetimepicker6').datetimepicker('destroy');
|
|
|
|
this.value = 'create';
|
|
|
|
}else{
|
|
|
|
$('#datetimepicker6').datetimepicker();
|
|
|
|
this.value = 'destroy';
|
|
|
|
}
|
|
|
|
});
|
2013-11-03 10:35:38 +00:00
|
|
|
</script>
|
|
|
|
</html>
|