Posted at

JavaScript jquery.datetimepicker.js

datetimepicer の簡易サンプル、オプションはてきとうに設定


download (zip)

https://xdsoft.net/jqplugins/datetimepicker/


html

<!DOCTYPE html>

<html lang="ja">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>

<link rel="stylesheet" type="text/css" href="./jquery.datetimepicker.css"/>
<script src="./jquery.js"></script>
<script src="./build/jquery.datetimepicker.full.js"></script>
<script>
$(function(){
$('#datetimepicker1').datetimepicker({
timepickerScrollbar:true,
scrollTime:true,
scrollInput:true,
scrollMonth:true
});
$('#datetimepicker2').datetimepicker({datepicker:false});
$('#datetimepicker3').datetimepicker({timepicker:false});
});
</script>
</head>

<body>
<h3>DateTimePicker</h3>
<input type="text" id="datetimepicker1"/><br><br>
<h3>TimePicker</h3>
<input type="text" id="datetimepicker2"/><br><br>
<h3>DatePicker</h3>
<input type="text" id="datetimepicker3"/><br><br>
</body>
</html>


  • scrollTime のオプションきかない...

    build/jquery.datetimepicker.full.js 2087行目に以下を追加すれば...

            if (!options.scrollTime) {

timeboxparent.off('mousewheel');
}