MultiDatesPicker (aka MDP) is a plugin that enables jQuery UI calendar to manage multiple dates
General
MultiDatesPicker (aka MDP) is a plugin that enables jQuery UI calendar to manage multiple dates with the following features:
- Select date ranges
- Pick multiple dates not in secuence
- Define a maximum number of pickable dates
- Define a range X days from where it is possible to select Y dates
- Define unavailable dates
How to use it
Being an extension to jQuery UI DatePicker you need to include both jQuery and jQuery UI (with datepicker module included) JavaScript files to your HTML page, and right after that, include MultiDatesPicker.
To apply it to an element, do it the same way as you would do with jQuery UI datepicker, but write multiDatesPicker
instead of datepicker
:
$(element_or_selector).multiDatesPicker(options);
MultiDatesPicker specific options
addDates
Adds an array of dates specified in a string, milliseconds or javascript date object format.
addDisabledDates
Disables an array of dates specified in a string, milliseconds or javascript date object format.
mode
Allows to enable a different MDP modes: 'normal' (default) or 'daysRange'.
normal mode options
1 maxPicks
Number of dates allowed to be selected (see demo).
2 pickableRange
Limits the range of dates available for selection to a certain number of days from the first selection.
3 adjustRangeToDisabled
A boolean that allows to maintain the number of pickable days even in case there are disabled days within the range specified in 'pickableRange'.
daysRange mode options
1 autoselectRange
Array of two integers: the first sets the beginning of the range relative to the date clicked on; the last sets the end of the range. Both numbers may be negative.
Info & Docs
Current version: 1.6.6