Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weekdays #123

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Weekdays #123

wants to merge 2 commits into from

Conversation

GreyHead
Copy link

Add option to enable only specified weekdays

I seem to have got a clean diff . . . but have managed to get the UA language change in here too and can't see how to remove it again :-(

Added a new option 'weekdays' that takes an optional array of day
numbers e.g. {0,3,4}. If the array is present then the available dates
are limited to the days in the array.

The option is applied in the isUnavailable() function when the calendar
is rendered.
if ( typeof avaliableDates == 'undefined' ) {
availableDates = null;
}
if (!minDate && !maxDate && !availableDates && !weekdays) return false;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I recall correctly it was there to remove a warning about an undefined value. But it is not in my current version so is probably not needed. I re-started with a clean fork after getting into a mess with this version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants