I'm trying to create a v-calendar with vuetify.
The problem is that I can't start at 10:00 and show 3:00 the next day.
How can I display it until 3 o'clock the next day?
<v-calendar
ref="calendar"
v-model="focus"
color="primary"
type="category"
category-show-all
:categories="categories"
:events="events"
:event-color="getEventColor"
first-interval=10
interval-minutes= 60
@change="fetchEvents()"
></v-calendar>


There is a solution but it's a bit hacky (doesn't seem natively supported by Vuetify). First, you'll need to use the prop
interval-countWhen you use this to show hours past midnight, the calendar will grow vertically to accommodate the additional hours, but will still not show the interval labels for those hours.
If we use another prop called
show-interval-label, it takes a function that:Using the props together:
Here I define a method
showIntervaland in showInterval if I console.log all the intervals it receives, the first interval that is not displayed (1:00am) looks like this:Even if we
return truefor all intervals, the intervals after midnight still won't be displayed on the calendar. That is because the v-calendar template code knows after midnight it should only display intervals for the next day, but the interval object itself still has properties defining it using the previous day (date,day,weekday, etc)To get these intervals to display we have to modify the object to look like this instead:
The full code for doing so is below which I also included in a codepen