search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Using Vue Calendar component with the Composition API

Asked by MK
2 years ago.

Hello
I'm confused on how I should use it with Composition API, I'm currently trying to rewrite the tutorial this way but just can't figure out how.
Since this API is currently the preferred way of writing Vue components, please add a tutorial on how it can be done.

Thank you

Answer posted by Dan Letecky [DayPilot]
2 years ago.

When using the Composition API in Vue, you can use the calendar component like this:

<template>
  <DayPilotCalendar id="dp" :config="config" />
</template>

<script>
import {DayPilotCalendar} from '@daypilot/daypilot-lite-vue'

export default {
  name: 'WeeklyCalendar',
  props: {
  },
  components: {
    DayPilotCalendar
  },
  setup() {
    const config = {
      viewType: "Week"
    };

    return {
      config
    };
  }
}
</script>

A complete tutorial with a sample project is coming soon.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.