jquery的datepicker

<link rel="stylesheet" href="../css/jquery.ui.all.css">
<script type="text/javascript" src="../js/jquery-1.7.2.js"></script>
<LINK href="../css/admin.css" type="text/css" rel="stylesheet">
<link rel="stylesheet" href="../css/demos.css">
<script src="../js/jquery.ui.core.js"></script>
<script src="../js/jquery.ui.widget.js"></script>
<script src="../js/jquery.ui.datepicker.js"></script>

注意:<script type="text/javascript" src="../js/jquery-1.7.2.js"></script>要先加载,因为其它js要调用jquery-1.7.2.js


<script>
    $(function(){
        $("#startDate").datepicker({
            changeMonth: true,
            changeYear: true,
            dateFormat: 'yy-mm-dd',
            dayNamesMin:['日','一','二','三','四','五','六'],
            monthNamesShort:['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],
            nextText:"下一月",
            prevText:"上一月",
            currentText:"今天",  
            closeText:"关闭",
            showButtonPanel: true,
            duration:0
        });
    });
</script>

注:添加的相关文件

效果图:

原文地址:https://www.cnblogs.com/Jiphen/p/2622275.html