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

[Calendar] Add ability to disable days of week #199

Merged
merged 1 commit into from
Oct 24, 2018

Conversation

prudho
Copy link
Contributor

@prudho prudho commented Oct 24, 2018

Description

This PR add the ability to disable some days of the week from selection. By setting disabledDaysOfWeek to array of numbers (0= Sunday, 1=Monday...), you can now disallow users from selecting these days.

Screenshot

disabledDaysOfWeek: [0, 3, 6]
e83d8246564d523526c4c6bc5a4b7f1b.png

@prudho prudho added type/feat Any feature requests or improvements lang/javascript Anything involving JavaScript state/awaiting-reviews Pull requests which are waiting for reviews state/awaiting-docs Pull requests which need doc changes/additions labels Oct 24, 2018
@prudho prudho added this to the 2.6.4 milestone Oct 24, 2018
@prudho prudho self-assigned this Oct 24, 2018
Copy link
Member

@lubber-de lubber-de left a comment

Choose a reason for hiding this comment

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

Great addition, we should consider doing this for single dates also. So another option settings.disabledDates could hold an array of to be disabled date-objects.
There already is the undocumented (!) isDisabled function in the settings (which always return false), but this needs to provide a whole function logic.
I'll create an issue for you 😄 but the implementation will be at the exact same code-lines.

Anyway this PR itself LGTM

Copy link
Member

@y0hami y0hami left a comment

Choose a reason for hiding this comment

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

LGTM

@y0hami y0hami merged commit dd957bc into fomantic:beta Oct 24, 2018
@lubber-de lubber-de removed the state/awaiting-reviews Pull requests which are waiting for reviews label Oct 25, 2018
@lubber-de lubber-de removed the state/awaiting-docs Pull requests which need doc changes/additions label Oct 30, 2018
@lubber-de lubber-de added the state/has-docs A issue/PR which requires documentation changes and has the corresponding PR open in the docs repo label Nov 9, 2018
@y0hami y0hami mentioned this pull request Nov 14, 2018
@prudho prudho deleted the calendar-disabled-weekdays branch April 11, 2019 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/javascript Anything involving JavaScript state/has-docs A issue/PR which requires documentation changes and has the corresponding PR open in the docs repo type/feat Any feature requests or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants