jquery datetimepicker

时间:2023-12-14 18:18:26

1.详细说明见:https://xdsoft.net/jqplugins/datetimepicker/

语言选择中文,现在lang配置已经失效;可用: $.datetimepicker.setLocale('ch');

<!DOCTYPE html>
<html lang="en">
<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.min.js"></script> </head>
<body>
<input id="datetimepicker1" type="text" > </body> <script>
$.datetimepicker.setLocale('zh');
jQuery('#datetimepicker1').datetimepicker({
format:'Y-m-d H:i',
onClose: function(dateText, inst) { console.log("+++++++++onclose++++++++"); },
onSelectDate: function(dateText, inst) { console.log(dateText); },
onSelectTime: function(dateText, inst) { console.log(dateText); },
}); </script>
</html>