Simple Date Picker With Min/Max Year Configs

File Size: 5.24 KB
Views Total: 4011
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Simple Date Picker With Min/Max Year Configs

A simple, lightweight, cross-browser jQuery date picker plugin that allows you to specify the min/max years for Birth Date selection.

More Resources:

How to use it:

1. Add references to jQuery library and the simpleDatepicker plugin's files.

<link href="/path/to/jquery.simpleDatepicker.css" rel="stylesheet" />
<script src="/path/to/jquery.min.js"></script>
<script src="/path/to/jquery.simpleDatepicker.js"></script>

2. Create an input field associated with the date picker.

<input type="text" name="date" id="pickdate" value="" class="pickdate">

3. Call the function simpleDatepicker to initialize the date picker on the input field.

$(function(){
  $('.pickdate').simpleDatepicker();
});

4. Set the min/max years. Useful for a DOB picker.

$(function(){
  $('.pickdate').simpleDatepicker({
    startYear:1900, 
    endYear:2020
  });
});

This awesome jQuery plugin is developed by pathakpradeep22. For more Advanced Usages, please check the demo page or visit the official website.