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 |
A simple, lightweight, cross-browser jQuery date picker plugin that allows you to specify the min/max years for Birth Date selection.
More Resources:
- 10 Best Date And Time Picker Plugins
- 10 Best Date And Timer Pickers In Pure JavaScript
- 10 Best Date Picker Components For Vue.js
- 10 Best Date Picker Libraries For Angular
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.