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

How to put background on days that are holiday? #51

Open
edsonrbispo opened this issue Feb 25, 2017 · 1 comment
Open

How to put background on days that are holiday? #51

edsonrbispo opened this issue Feb 25, 2017 · 1 comment

Comments

@edsonrbispo
Copy link

No description provided.

@richardtallent
Copy link
Contributor

I've made a small update that adds a class to each date box in the form "dtYYYY-MM-DD". This would allow you to use your own CSS to format holidays in a special way.

For example, if you included the following CSS, this coming Christmas will be shown in pale green and will have a Christmas tree icon to the right of the day number:

.dt2017-12-25 { background-color: #F0FFF0; }
.dt2017-12-25 .monthly-day-number:after { content: '\1F384'; }

Using CSS to style special dates directly is more flexible than having to, say, pass an array of holidays in the options. I debated having a variation of this class without the year, but only a few holidays (at least here in the States) are on the same date each year, so having the year allows maximum flexibility.

@kthornbloom kthornbloom mentioned this issue Apr 21, 2018
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

2 participants