datetimepicker/index.html
Valeriy 161800fe89 New version
Add method show and hide
$('#datetimepicker4').datetimepicker('show');
$('#datetimepicker4').datetimepicker('hide');
2013-11-07 10:24:58 +06:00

41 lines
1.2 KiB
HTML

<html>
<link rel="stylesheet" type="text/css" href="jquery.datetimepicker.css"/>
<body>
<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"/>
</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',
step:5,
});
$('#datetimepicker2').datetimepicker({
timepicker:false,
format:'d/m/Y',
});
$('#datetimepicker3').datetimepicker({
inline:true,
});
$('#datetimepicker4').datetimepicker();
$('#open').click(function(){
$('#datetimepicker4').datetimepicker('show');
});
$('#close').click(function(){
$('#datetimepicker4').datetimepicker('hide');
});
</script>
</html>