@holitime/schedule-x-vue
TypeScript icon, indicating that this package has built-in type declarations

1.52.0 • Public • Published

qalendar

DISCLAIMER

This is a customized version of schedule-x/vue github repo.

@schedule-x/vue

This package offers Vue components for the Schedule-X calendar and date picker. For the full documentation, please refer to: https://schedule-x.dev/

Quick start examples

Calendar

<script setup>
import { ScheduleXCalendar } from '@schedule-x/vue'
import {
  createCalendar,
  viewDay,
  viewWeek,
  viewMonthGrid,
  viewMonthAgenda,
} from '@schedule-x/calendar'
import '@schedule-x/theme-default/dist/index.css'

// Do not use a ref here, as the calendar instance is not reactive, and doing so might cause issues
// For updating events, use the events service plugin
const calendarApp = createCalendar({
  selectedDate: '2023-12-19',
  views: [viewDay, viewWeek, viewMonthGrid, viewMonthAgenda],
  defaultView: viewWeek.name,
  events: [
    {
      id: 1,
      title: 'Event 1',
      start: '2023-12-19',
      end: '2023-12-19',
    },
    {
      id: 2,
      title: 'Event 2',
      start: '2023-12-20 12:00',
      end: '2023-12-20 13:00',
    },
  ],
})
</script>

<template>
  <div>
    <ScheduleXCalendar :calendar-app="calendarApp" />
  </div>
</template>

Date picker

<script setup lang="ts">
import { SxDatePicker } from '@schedule-x/vue'
import '@schedule-x/theme-default/dist/date-picker.css'
import { ref } from 'vue'

const datePickerModel = ref<string>('2024-07-12')
</script>

<template>
  <div>
    <p id="date-picker-model">{{ datePickerModel }}</p>

    <SxDatePicker ref="datePickerRef" v-model="datePickerModel" />
  </div>
</template>

Readme

Keywords

none

Package Sidebar

Install

npm i @holitime/schedule-x-vue

Weekly Downloads

49

Version

1.52.0

License

MIT

Unpacked Size

151 kB

Total Files

12

Last publish

Collaborators

  • astowny
  • matp