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

If date is disabled & selected, it should still have class selected #1905

Open
swrobel opened this issue Aug 8, 2019 · 0 comments
Open

If date is disabled & selected, it should still have class selected #1905

swrobel opened this issue Aug 8, 2019 · 0 comments

Comments

@swrobel
Copy link

swrobel commented Aug 8, 2019

When using "multiple" mode and disabling a selected date, it only receives the class flatpickr-disabled and not selected. This choice seems to be intentional, but I think it should have both classes. Use case: I want to show users dates they've selected in a previous session, but not allow them to remove those dates, only add new dates.

Current:

<span class="flatpickr-day flatpickr-disabled" aria-label="August 30, 2019">30</span>

Should be:

<span class="flatpickr-day selected flatpickr-disabled" aria-label="August 30, 2019">30</span>

Repro: https://jsfiddle.net/swrobel/sxnLe8bk/
Code ref: https://github.com/flatpickr/flatpickr/blob/v4.6.2/src/index.ts#L697
Similar to: If "today" is disabled it should still have the class "today"

Your Environment

  • flatpickr version used: 4.6.2
  • Browser name and version: Chrome 76
  • OS and version: macOS 10.14
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

No branches or pull requests

1 participant