question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Styling an entire day individually on a v-calendar

See original GitHub issue

Problem to solve

I’m representing data on a calendar, and I’d like to use a conditional class to style calendar days individually. I can’t see how this is possible within the current <template scope-slot="day"></template> at the moment.

Proposed solution

https://i.imgur.com/LcBeZAX.png

Conditionally applying a class on the day. This example was done editing things in the inspector, but it would be cool if we could just easily add a flag to the day instance like :background-color="backgroundColour".

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

4reactions
LucaColombicommented, Nov 10, 2020

I did some magic, by using a template with a coloured square:

	<v-calendar locale="it" min-weeks="5" ref="calendar" v-model="calendar.value"
	.....>
		<template v-slot:day="{ past, date }">
			<div v-if="calendar.dates[date]" style="position:absolute;top:0;left:0;right:0;bottom:0;opacity:0.5" v-bind:style="{ 'background-color': calendar.dates[date].color }">
				&nbsp;
			</div>
		</template></v-calendar>

you can start from here and see if you can obtain what you want

anyway, this component should have a little more extensibility

0reactions
mrkazucommented, Jan 27, 2021

I did some magic, by using a template with a coloured square:

	<v-calendar locale="it" min-weeks="5" ref="calendar" v-model="calendar.value"
	.....>
		<template v-slot:day="{ past, date }">
			<div v-if="calendar.dates[date]" style="position:absolute;top:0;left:0;right:0;bottom:0;opacity:0.5" v-bind:style="{ 'background-color': calendar.dates[date].color }">
				&nbsp;
			</div>
		</template></v-calendar>

you can start from here and see if you can obtain what you want

anyway, this component should have a little more extensibility

This is nice! however, the div layer will be under the events but above the date button, making the day button not activate functions when clicked.

to fix this you need to add

.v-btn–fab { z-index: 2; }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Community Events Feature Requests -
As with the feature request thread we've got for Events Calendar PRO, ... How about recurring events that happen on that specific day...
Read more >
Features - VueMinder Pro and Ultimate Help
VueMinder is a full-featured calendar program for Windows 10, 8, ... Calendars can be individually configured with default reminder options for new events....
Read more >
How to Create an “Add to Calendar” Link for Your Emails
To create Add to Calendar links for webmail calendars, we suggest Amit Agarwal's Calendar Links tool. It will generate the entire URLs you'll ......
Read more >
Chapter 9. Reference - KDE Documentation -
The File menu provides access to functions involving the entire calendar. ... Calendar Widget) and the Print Style (Day, Week, Month or To-dos...
Read more >
gmail - Add a multi-event ICalendar file to Google Calendar
I can only get the multi-event style view to display if I individually attach the calendar invites. So that works when in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found