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

feat:Calendar:add disabledDate #5602

Merged
merged 8 commits into from
Dec 16, 2023
Merged

feat:Calendar:add disabledDate #5602

merged 8 commits into from
Dec 16, 2023

Conversation

kl-nevermore
Copy link
Contributor

@kl-nevermore kl-nevermore commented Dec 14, 2023

Fix #5581

  • If any date can be selected in currentYear or currentMonth, then the year and month should also be selectable
  • If any month can be selected, then the year should also be selectable
  • if all date disabled ,then the year and month should also be disabled
  • if all month disabled ,then the year and date should also be disabled
  • if all year disabled ,then the mouth and date should also be disabled

I will add test cases recently.

checkDateIsDisabled cost time (i7-12700 windows10 chrome)

view 1x 4x 6x
year 2.3ms 11.4ms 18.5ms
month 1.1ms 3.1ms 4.6ms

Copy link

vercel bot commented Dec 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
primereact ⬜️ Ignored (Inspect) Visit Preview Dec 16, 2023 5:34am
primereact-v9 ⬜️ Ignored (Inspect) Visit Preview Dec 16, 2023 5:34am

@kl-nevermore kl-nevermore marked this pull request as ready for review December 15, 2023 08:25
components/lib/calendar/Calendar.js Outdated Show resolved Hide resolved
@melloware melloware added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Dec 15, 2023
@melloware melloware merged commit 05a83b4 into primefaces:master Dec 16, 2023
6 checks passed
@kl-nevermore kl-nevermore deleted the fix-5581 branch December 16, 2023 15:38
@melloware melloware mentioned this pull request Jan 9, 2024
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calendar:about disabled logic
2 participants