Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Using v-calendar with events coming in time and date format

when I look for the api event, the time would be ex: 12:00 the v-calendar abbreviates to just 12, if I look for the time that password the minutes it brings complete, since it seems to be a vuetify v-calendar behavior, someone already solved?

enter image description here

Problema com abreviação do vuetify v-calendar

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can use the slot #event inside VCalendar component. Like this:

<v-calendar>
    <template #event={ parsedEvent, event }>
        {{ parsedEvent.start.time }} - {{ event.name }}
    </template>
</v-calendar>
  • parsedEvent: All the data from your event already formated.
  • event: The data from your events array.

Using like this, you can create custom views for your events.
Remember that you use the #event slot, the event-name will be ignorated by the VCalendar component, so you will need to destruct { event } to access this property.

I suggest you to read more about the slots from the vuetify documentation.
https://v2.vuetifyjs.com/en/api/v-calendar/

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading