[Vuejs]-Dayspan Vuetify: Add a button inside day cell

0👍

You can put whatever you want in the template (see the button):

https://github.com/ClickerMonkey/dayspan-vuetify-example/blob/master/src/App.vue

<template slot="eventTimeTitle" slot-scope="{calendarEvent, details}">
        <div>
          <v-icon class="ds-ev-icon"
            v-if="details.icon"
            size="14"
            :style="{color: details.forecolor}">
            {{ details.icon }}
          </v-icon>
          <v-btn outline @click="doSomething" color="indigo">Button</v-btn>
          <strong class="ds-ev-title">{{ details.title }}</strong>
        </div>
        <div class="ds-ev-description">{{ getCalendarTime( calendarEvent ) }}</div>
      </template>

Add a method for the click:

doSomething(e) {
  console.log(e);
  alert('clicked')
}

Leave a comment