Skip to content

How do you style first date and last date of a range p-calendar? #84

Discussion options

You must be logged in to vote

Hi,

Unfortunately, the calendar component doesn't have a feature that changes only first and last dates of the range value. However, you can open an issue requesting that feature on the repo.

I'm not sure but that might help, but the result won't be the same as in the screenshot:

1-) Access view of the calendar
2-) Get the elements with the .p-highlight class or get the elements of selected dates.
3-) Append styles to first and the last element or append a class that can make changes you want.

For now, I don't see a possible solution by just CSS, but some javascript can help you as I mentioned above.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mdnafeed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants