Constrain dates #25

wants to merge 4 commits into from

1 participant

Components member

Add optional date restriction for calendar.min and max methods added to restrict dates. Invalid dates (dates outside of valid range) are rendered with 'invalid' class. Clicks on invalid dates do not generate change events.

pirxpilot added some commits Feb 17, 2013
@pirxpilot pirxpilot add `test` target in Makefile
mocha as devel dependency
@pirxpilot pirxpilot Options for jshint 4ce7cdc
@pirxpilot pirxpilot Implement dates restriction
Calendar has new `min` and `max` functions to define inclusive range of
valid dates.

Range checking is performed by DayRange class.
When rendering calendar dates ourside of the range are rendered with
`invalid` CSS class, so that can they be styled differently from valid

Days will not fire 'change' event for invalid (out-of-range) dates.
Calendar ignores attempts to select invalid date, although is allows to
show it.
@pirxpilot pirxpilot Document new `min` and `max` methods 16b5f20
Components member

I'll submit another (cleaned up version) soon. @visionmedia could you just merge #22 and #23 - there should be nothing controversial about them.

@pirxpilot pirxpilot closed this Mar 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment