1、下载JQueryUI
地址:Download Builder | jQuery UI
2、页面中引入css和js文件
<link href="jquery-ui-1.13.1.custom/jquery-ui.css" rel="stylesheet">
<script src="jquery-ui-1.13.1.custom/external/jquery/jquery.js"></script>
<script src="jquery-ui-1.13.1.custom/jquery-ui.js"></script>
3、页面添加input元素,承载日期控件,并指定元素id
<input type="text" name="startDate" id="startDateId" />
4、通过js调用初始化JQueryUI日期控件
$(function(){
$("#startDateId").datepicker();
});
4、效果