V-calendar: Set css class to highlighted day

Created on 13 Mar 2018  路  7Comments  路  Source: nathanreyes/v-calendar

There's a way to set custom class to highlighted day element?

enhancement

All 7 comments

The ability to use a class to target a highlighted day element is not currently supported. You can use the attribute's contentStyle to style the day element when it is highlighted.

Are you not able to achieve the effect that you would like?

This would be a nice feature. I needed the same thing yesterday and this is in my todo list right now. After I made I will open a PR.

@nathanreyes I think it would be useful to have the possibility to manage the style directly in the css. Thanks for your work, this component is simply amazing!

I agree that would be a nice feature. Would appreciate recommendations on the best approach from an API perspective. Also, are we talking just classes for the content, or the actual highlight as well. Just a note, the reason classes weren't exposed for highlights is because highlight regions could get messed up if you are simply applying a simple borderRadius in your own classes.

Hi there, related to this, how do I style the selected day? I can style hovered days, but not the selected day, it simply stays the default dark blue dot that it started out as, no matter what I style.

My dayContent() function sets all day styles easily except for the selected day.

Any help would be appreciated, I can't see anything in the docs about this.

To also clarify a bit more, if this needs to get set in an if(args.isFocused){}, then the isFocused is not being set as true ever for some reason. I also checked the args.day object, but can't find an active flag in there either to set the active day styles with.

Closing this issue as you can use the highlight.class or highlight.contentClass for the background and content elements.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sokolovdm picture sokolovdm  路  3Comments

redraw picture redraw  路  3Comments

eafomi4ev picture eafomi4ev  路  3Comments

nik736 picture nik736  路  3Comments

rcascante picture rcascante  路  3Comments