jSelectDate

jQuery date choice control with dropdown list

View the Project on GitHub huacnlee/jselectdate

jSelectDate is a simple drop-down list date select of jQuery plugin . It is different from previous choice of the date of control, it is embodied in the way the drop-down list, this may facilitate a better user experience.

Example

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>jQuery.jSelectDate example</title>
  <script type="text/javascript" src="scripts/jquery.js"></script>
  <script type="text/javascript" src="scripts/jquery.jSelectDate.js"></script>
  <script type="text/javascript">        
    $("body").ready(function(){          
      //apply jselectdate
      $("input.date").jSelectDate({
        css:"date",
        yearBeign: 1995,
        disabled : false
      });
    })

    $(this).jSelectDate();
  </script>        
</head>
<body>
  <input type="text" id="txtName" class="date" value="2005-3-22" /> <button onclick="alert($(’#txtName’).val());">当前值</button>
  <br /><br />
  <input type="text" id="txtDate2" class="date" value="1995-5-2" />
</body>
</html>