Skip to content

A simple way to implement smart date select boxes. Given month, day, and year select boxes, this plugin will automatically populate the day select box with the proper amount of days for a given year and month combination, taking leap years into account.

Notifications You must be signed in to change notification settings

NickBusey/jQuery-Date-Select-Boxes-Plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version: 2.0.0

A simple way to implement smart date select boxes. Given month, day, and year select boxes, this plugin will automatically populate the day select box with the proper amount of days for a given year and month combination, taking leap years into account.

Demo: http://nickbusey.github.io/jQuery-Date-Select-Boxes-Plugin/

Install: bower install jQueryDateSelectBoxes

Usage: $().dateSelectBoxes({
	monthElement: $('#birthMonth'),
	dayElement: $('#birthDay'),
	yearElement: $('#birthYear'),
	keepLabels: true
});

Options:
	keepLabels - Preserves the first option in the select
		Default: false
	generateOptions - Populates the selects with options
		Default: false
	yearMax - Maximum year generated by generateOptions
		Default: new Date().getFullYear()
	yearMin - Minimum year generated by generateOptions
		Default: 1900
	yearLabel - Label for generated options
		Default: 'Year'
	monthLabel - Label for generated options
		Default: 'Month'
	dayLabel - Label for generated options
		Default: 'Day'

Uses and includes the jQuery Select Box Manipulation plugin http://www.texotela.co.uk/code/jquery/select/

About

A simple way to implement smart date select boxes. Given month, day, and year select boxes, this plugin will automatically populate the day select box with the proper amount of days for a given year and month combination, taking leap years into account.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published