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

fix: add selectOtherMonths to p-calendar #339

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

jdegand
Copy link
Contributor

@jdegand jdegand commented Jul 16, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

You cannot select events in the next month of the calendar.

Issue Number: #337

What is the new behavior?

I added selectOtherMonths to p-calendar and now events that are early in the next months are clickable.

Closes #337.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

I didn't look into testing or anything extra.

@jdegand
Copy link
Contributor Author

jdegand commented Jul 16, 2024

I had CORS issues when I served the app and it crashed but not before I was able to hover over the event and see the cursor change.

@geromegrignon
Copy link
Contributor

Thanks, I'll keep the PR open by now: I wonder if there is some way to identify the "not-current" month dates to customize their styling. "othermonths" dates are not gray anymore, both fine as selectable but confusing to identify the start/end of the current month.

@jdegand
Copy link
Contributor Author

jdegand commented Jul 16, 2024

disabledDays or disabledDates may work in combination with selectOtherMonths.

Since the dates without an event are not saved anywhere, you need to create all days without an event to pass to disabledDates.

It may be easier to use disabledDays to filter an array with 1-31. But disabling all days will break existing functionality and prevent clicking on the day and having there is no event scheduled message appear.

@geromegrignon geromegrignon merged commit 2ea2c7e into angular-sanctuary:main Aug 9, 2024
1 check passed
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.

[Bug]: Events can't be clicked if early in next month.
2 participants