JQuery的DateTimepicker

DateTimepicker.html

<html>
<head>
    <title></title>
	<link type="text/css" href="jquery-ui/jquery-ui-1.9.2.css" rel="stylesheet"></link>
	
    <link href="jQuery-Timepicker-Addon/jquery-ui-timepicker-addon.css" type="text/css" />
    <link href="jQuery-Timepicker-Addon/demos.css" rel="stylesheet" type="text/css" />

    <script src="jquery/jquery-1.8.3.js"></script>
    
    <script type="text/javascript" src="jquery-ui/jquery-ui-1.9.2.js"></script>
    <script src="jQuery-Timepicker-Addon/jquery-ui-timepicker-addon.js" type="text/javascript"></script>

    <!--中文-->
    <script src="js/jquery.ui.datepicker-zh-CN.js" type="text/javascript" charset="gb2312"></script>
    <script src="js/jquery-ui-timepicker-zh-CN.js" type="text/javascript"></script>
    <script type="text/javascript">
        jQuery(function () {
            // 时间设置
            jQuery('#time').datetimepicker({
                timeFormat: "HH:mm:ss",
                dateFormat: "yy-mm-dd"
            });
        });
    </script>
</head>
<body>
    <input id="time" type="text" />
</body>
</html>

运行结果:

JQuery的DateTimepicker

你可能感兴趣的:(JavaScript,jquery,datetimepicker)