jQuery UI Datepicker

http://www.runoob.com/try/try.php?filename=jqueryui-example-datepicker-dropdown-month-year

 <!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>jQuery UI 日期选择器(Datepicker) - 显示月份 &amp; 年份菜单</title>
  <link rel="stylesheet" href="//apps.bdimg.com/libs/jqueryui/1.10.4/css/jquery-ui.min.css">
  <script src="//apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
  <script src="//apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
  <link rel="stylesheet" href="jqueryui/style.css">
  <script>
  $(function() {
    $( "#datepicker" ).datepicker({
      changeMonth: true,    //Month Year 下拉框
      changeYear: true,
      minDate: -20,     //限制选择日期区间
      maxDate: "+1M +10D" 
    });
  });
  </script>
</head>
<body>
 
<p>日期:<input type="text" id="datepicker"></p>
 
 
</body>
</html>

 

posted @ 2016-02-24 11:01  怪咖Eric  阅读(168)  评论(0编辑  收藏  举报