JSPM

  • Created
  • Published
  • Downloads 199407
  • Score
    100M100P100Q162306F
  • License MIT

A calendar and date picker plugin for Vue.js.

Package Exports

  • v-calendar
  • v-calendar/dist/cjs/index.css
  • v-calendar/dist/cjs/index.js
  • v-calendar/dist/cjs/index.js.map
  • v-calendar/dist/es/index.js
  • v-calendar/dist/es/index.js.map
  • v-calendar/dist/es/style.css
  • v-calendar/dist/iife/index.js
  • v-calendar/dist/iife/index.js.map
  • v-calendar/dist/mjs/index.mjs
  • v-calendar/dist/mjs/index.mjs.map
  • v-calendar/dist/mjs/style.css
  • v-calendar/dist/stats.html
  • v-calendar/dist/style.css
  • v-calendar/dist/types/src/components/BaseIcon/BaseIcon.vue.d.ts
  • v-calendar/dist/types/src/components/BaseIcon/icons/IconChevronDown.vue.d.ts
  • v-calendar/dist/types/src/components/BaseIcon/icons/IconChevronLeft.vue.d.ts
  • v-calendar/dist/types/src/components/BaseIcon/icons/IconChevronRight.vue.d.ts
  • v-calendar/dist/types/src/components/BaseIcon/icons/IconClock.vue.d.ts
  • v-calendar/dist/types/src/components/BaseIcon/icons/index.d.ts
  • v-calendar/dist/types/src/components/BaseSelect/BaseSelect.vue.d.ts
  • v-calendar/dist/types/src/components/Calendar/Calendar.vue.d.ts
  • v-calendar/dist/types/src/components/Calendar/CalendarDay.vue.d.ts
  • v-calendar/dist/types/src/components/Calendar/CalendarDayPopover.vue.d.ts
  • v-calendar/dist/types/src/components/Calendar/CalendarHeader.vue.d.ts
  • v-calendar/dist/types/src/components/Calendar/CalendarNav.vue.d.ts
  • v-calendar/dist/types/src/components/Calendar/CalendarNavPopover.vue.d.ts
  • v-calendar/dist/types/src/components/Calendar/CalendarPage.vue.d.ts
  • v-calendar/dist/types/src/components/Calendar/CalendarPageProvider.vue.d.ts
  • v-calendar/dist/types/src/components/Calendar/CalendarSlot.vue.d.ts
  • v-calendar/dist/types/src/components/Calendar/CalendarTitleSelect.vue.d.ts
  • v-calendar/dist/types/src/components/CalendarGrid/CalendarCell.vue.d.ts
  • v-calendar/dist/types/src/components/CalendarGrid/CalendarCellPopover.vue.d.ts
  • v-calendar/dist/types/src/components/CalendarGrid/CalendarDayCell.vue.d.ts
  • v-calendar/dist/types/src/components/CalendarGrid/CalendarEventDetails.vue.d.ts
  • v-calendar/dist/types/src/components/CalendarGrid/CalendarEventEdit.vue.d.ts
  • v-calendar/dist/types/src/components/CalendarGrid/CalendarGrid.vue.d.ts
  • v-calendar/dist/types/src/components/CalendarGrid/CalendarGridWeek.vue.d.ts
  • v-calendar/dist/types/src/components/CalendarGrid/CalendarViewSelect.vue.d.ts
  • v-calendar/dist/types/src/components/CalendarGrid/CalendarWeekCell.vue.d.ts
  • v-calendar/dist/types/src/components/CalendarGrid/Constraints.d.ts
  • v-calendar/dist/types/src/components/DatePicker/DatePicker.vue.d.ts
  • v-calendar/dist/types/src/components/DatePicker/DatePickerBase.vue.d.ts
  • v-calendar/dist/types/src/components/DatePicker/DatePickerPopover.vue.d.ts
  • v-calendar/dist/types/src/components/DatePicker/TimePicker.vue.d.ts
  • v-calendar/dist/types/src/components/Popover/Popover.vue.d.ts
  • v-calendar/dist/types/src/components/Popover/PopoverRow.vue.d.ts
  • v-calendar/dist/types/src/components/index.d.ts
  • v-calendar/dist/types/src/index.d.ts
  • v-calendar/dist/types/src/use/base.d.ts
  • v-calendar/dist/types/src/use/calendar.d.ts
  • v-calendar/dist/types/src/use/calendarGrid.d.ts
  • v-calendar/dist/types/src/use/datePicker.d.ts
  • v-calendar/dist/types/src/use/page.d.ts
  • v-calendar/dist/types/src/use/slots.d.ts
  • v-calendar/dist/types/src/use/timePicker.d.ts
  • v-calendar/dist/types/src/utils/attribute.d.ts
  • v-calendar/dist/types/src/utils/cache.d.ts
  • v-calendar/dist/types/src/utils/calendar/event.d.ts
  • v-calendar/dist/types/src/utils/config/index.d.ts
  • v-calendar/dist/types/src/utils/date/helpers.d.ts
  • v-calendar/dist/types/src/utils/date/range.d.ts
  • v-calendar/dist/types/src/utils/date/repeat.d.ts
  • v-calendar/dist/types/src/utils/date/rules.d.ts
  • v-calendar/dist/types/src/utils/defaults/index.d.ts
  • v-calendar/dist/types/src/utils/defaults/locales.d.ts
  • v-calendar/dist/types/src/utils/glyph.d.ts
  • v-calendar/dist/types/src/utils/helpers.d.ts
  • v-calendar/dist/types/src/utils/locale.d.ts
  • v-calendar/dist/types/src/utils/page.d.ts
  • v-calendar/dist/types/src/utils/plugins/index.d.ts
  • v-calendar/dist/types/src/utils/popovers.d.ts
  • v-calendar/dist/types/src/utils/theme.d.ts
  • v-calendar/dist/types/src/utils/touch.d.ts
  • v-calendar/dist/types/src/utils/watchers.d.ts
  • v-calendar/dist/types/tests/timezones.d.ts
  • v-calendar/dist/types/tests/unit/setup.d.ts
  • v-calendar/dist/types/tests/unit/specs/Calendar.spec.d.ts
  • v-calendar/dist/types/tests/unit/specs/DatePicker.spec.d.ts
  • v-calendar/dist/types/tests/unit/specs/locale.spec.d.ts
  • v-calendar/dist/types/tests/unit/specs/navigation.d.ts
  • v-calendar/dist/types/tests/unit/specs/range.spec.d.ts
  • v-calendar/dist/types/tests/unit/specs/slots.d.ts
  • v-calendar/dist/types/tests/unit/specs/utils.d.ts
  • v-calendar/dist/types/tests/unit/util/dayData.d.ts
  • v-calendar/dist/types/tests/unit/util/disabledTests.d.ts
  • v-calendar/dist/types/tests/unit/util/wait.d.ts
  • v-calendar/style.css

Readme

VCalendar Plugin for Vue 3

A calendar and date picker plugin for Vue.js.

Vue.js 3.2+, Popper.js 2.0+ are required.

Install Plugin

NPM

npm install v-calendar@next @popperjs/core

Yarn

yarn add v-calendar@next @popperjs/core

Use Plugin

⚠️ As of v3.0.0-alpha.7, all installation methods require manual import of component styles. This is due to Vite build restrictions in libary mode.

import 'v-calendar/style.css';

Method 1: Use Globally

import VCalendar from 'v-calendar';
import 'v-calendar/style.css';

// Use plugin with optional defaults
app.use(VCalendar, {})
<!-- MyComponent.vue -->
<template>
  <VCalendar />
  <VDatePicker v-model="date" />
</template>

Method 2: Use Components Globally

// main.js
import { setupCalendar, Calendar, DatePicker } from 'v-calendar';
import 'v-calendar/style.css';

// Use plugin defaults (optional)
app.use(setupCalendar, {})

// Use the components
app.component('VCalendar', Calendar)
app.component('VDatePicker', DatePicker)
<!-- MyComponent.vue -->
<template>
  <VCalendar />
  <VDatePicker v-model="date" />
</template>

Method 3: Use Components As Needed

// main.js
import { setupCalendar } from 'v-calendar';

// Use calendar defaults (optional)
app.use(setupCalendar, {})
<!-- MyComponent.vue -->
<template>
  <Calendar />
  <DatePicker v-model="date">
</template>

<script>
import { Calendar, DatePicker } from 'v-calendar';
import 'v-calendar/style.css';

export default {
  components: {
    Calendar,
    DatePicker,
  },
  data() {
    return {
      date: new Date(),
    };
  },
}
</script>

Source setup

Please follow below mentioned steps to clone and build this project:

Clone the repo

git clone https://github.com/nathanreyes/v-calendar

# Move to directory
cd v-calendar

Install dependencies

yarn

Build library

# Types, ES, ESM, CommonJS, IIFE
yarn build

Lint and fix files

yarn lint

Test library

# Types, ES, ESM, CommonJS, IIFE
yarn test