An elegant calendar and datepicker plugin for Vue.

Related tags

Calendar v-calendar
Overview


An elegant calendar and datepicker plugin for Vuejs.

Total Downloads Latest Release Next Release License


npm i --save v-calendar

Documentation

For full documentation, visit vcalendar.io.

Attributes

Highlights Dots
Bars Popovers

Multi-Paned Calendars

Theme Colors & Dark-Mode

Date Pickers

Single Date Multiple Date Date Range

Custom Calendars w/ Scoped Slots

Comments
  • Properly setting date format

    Properly setting date format

    I am using version 0.9.7.

    I've been struggling to set the date format correctly in my date range picker. Currently this is what I get as values:

    date:Object
    end:Thu Feb 14 2019 00:00:00 GMT+0100 (Midden-Europese standaardtijd)
    start:Tue Feb 12 2019 00:00:00 GMT+0100 (Midden-Europese standaardtijd)
    

    This is way too extensive, I just need YYYY-MM-DD, but how do I go about this? I have tried the date formatter, input formatter, it all does not seem to work.

    opened by Cannonb4ll 36
  • Vue 3 support

    Vue 3 support

    Hi, just wondering if you are planning to add support for Vue 3?

    I don't seem to be able to use it in a new project I'm starting.

    I'm getting an error "n.a.mixin is not a function" or something to that effect. If it's something I might be doing, please let me know!

    Thanks for your work!

    opened by soullpoint 25
  • Viable IE11 workaround?

    Viable IE11 workaround?

    Does anyone have a viable, working workaround beyond the vague "use polyfills" for getting this library to work in IE11? I understand the position of not wanting to "punish modern browsers", but this library - which we really like - is unusable in projects with a large audience. There are - unfortunately - large numbers of IE11 users in the real world. We've been at this for a few days so this is my last ditch effort before we move on to a different solution. Thank you!

    opened by dylanbromby 22
  • Wrong day

    Wrong day

    datepicker

    This is taken from the example in https://vcalendar.netlify.com/datepicker. As you can see the popover says "Sun, Oct 13, 1968" but the calendar shows "Mon, Oct 14, 1968". This seems to happen only when you go back a few decades, let say to the 60s or 20s...

    bug 
    opened by jonagoldman 21
  • Accessibility audit

    Accessibility audit

    I'm trying this carousel for the first time, thank you for your great work!

    I'm not an accessibility expert but I ran into a lot of issues when I tried the component.

    • [ ] The major issue is that there is no keyboard navigation support. You can see an example here.
    • [ ] Actually, the tab navigation browse to all the grid items, even if they are empty. Only the selected date should be "tabbable" and the other grid items should be accessible via the arrow keys. Also, add a default style when the grid item is focused.
    • [ ] Add aria-label to all the grid items. Something like "9, Tuesday July 2019", which is automatically updated when you change the language.

    Here is an article about accessible calendars: https://axesslab.com/accessible-datepickers/

    enhancement discussion 
    opened by DavidRouyer 17
  • Usage inside modals

    Usage inside modals

    Absolutely love this datepicker!

    Do you have any suggestions on how to handle the date input inside modals? If a parent container has overflow: hidden, the calendar is obviously cut off. Another datepicker I've used in the past, Kalendae, addressed this problem by appending the calendar element to <body> and setting the position of the calendar.

    I really wouldn't mind having to do that myself in my application, maybe using vue-portal, but I'm not sure that it's currently possible to access the calendar component for inputs in that way.

    Any suggestions?

    screen shot 2018-01-26 at 5 13 32 pm

    enhancement 
    opened by nickforddev 16
  • V-calendar disable functionality

    V-calendar disable functionality

    Hello, does V-calendar support disable functionality? I need to disable calendar based on some boolean value like standard input HTML component already has. Or can I perhaps, just disable navigation and date select option?

    opened by djanjic 15
  • Opening date picker programmatically

    Opening date picker programmatically

    I need to open the date picker by clicking a button, conditionally. I've tried to use the $refsmethod, but it didn't work. Could an identifier be implemented, or something else to handle this case?

    I need to do something like this: https://www.airbnb.com/rooms/735683?s=0kE5IldB Look at the booking box. When you click on the Check Availability button and the dates are null, it opens the date picker.

    opened by luiztsmelo 14
  • Memory issue?

    Memory issue?

    My javascript memory (tracked using the Memory tab of Chrome's developer tools) seems to be increasing when loading multiple times the calendar consecutively. In action, I use the calendar (<v-date-picker .../>) on a Vue route (let's call it A) ; when switching back and forth between routes A and B, I see the memory increasing every time (approximately 5 to 10MB). After removing the v-date-picker, the memory remains stable when switching routes again. I've tried removing all the parameters I'm using, but even with the most basic usage, the issue persist.

    Any idea on what could be the root cause there?

    Thank you very much!

    opened by jmaltis 13
  • Is there any possibility to reduce bundle size?

    Is there any possibility to reduce bundle size?

    I really like this plugin. But the bundle size is about 247 KB and it's quite big. I use components method for import (import DatePicker from 'v-calendar/lib/components/date-picker.umd'). Is there any possibility to reduce bundle size?

    opened by Va1entina 13
  • v-date-picker initial date is highlighted correctly but the month does not turn

    v-date-picker initial date is highlighted correctly but the month does not turn

    The date is highlight correctly but the date picker always show the current month so if i want to show the 15th april in the calendar today ( 30th march )

    The calendar will not turn to the correct month

    bug 
    opened by Uthpala 13
  • @next Issues with hightlight system

    @next Issues with hightlight system

    Hey, I run "vue": "^3.2.45" "v-calendar": "^3.0.0-alpha.8"

    I realize this is early stages alpha, but I am reporting my findings none the less. There are issue's using DatePicker - seems almost all of the customization through the highlights array are broken - in particular the foreground color and many others. And why on gods green earth does it not allow me (in a fully working scenario) to just use arbitrary CSS colors - being limited to the palette given can be a deal braker when dealing with companies that need most things branded after their own palette?

    Tip! v-calendar would clearly stand out as one of the best available alternatives when upgrading to Vue 3 as a Vuetify user, since they have apparently abandoned their built in calendar hint hint and your's if made to work properly with Vue 3 would be one of a few great alternatives...

    opened by Oskar-Andersson 0
  • Hide Date In TimePicker View

    Hide Date In TimePicker View

    Never thought I'd come across this use case, but recently, I have been interested in hiding the date that appears just above the timepicker. I've checked the attributes possible, and there's none for that. Screenshot 2022-12-22 at 8 09 52 am

    opened by jaletechs 2
  • When using the `day-content` slot, it is not possible to apply the styles that you set in the props `selectAttribute`.

    When using the `day-content` slot, it is not possible to apply the styles that you set in the props `selectAttribute`.

    When using the day-content slot, it is not possible to apply the styles that you set in the props selectAttribute. Of course, you can manually add styles for selected elements using an internal method. But in the case when the date range is active and you try to select a date, you need to clear the active styles so that they do not conflict with the styles in the drag mode.

    opened by Kirigetov 0
  • Manual time entry end time reset bug

    Manual time entry end time reset bug

    While modifying the time manually on the date/time range selector I found a scenario that resets the end time to match the start time:

    1. Select the same start and end date (start: 12/12, end: 12/12)
    2. Select the same time 12 hours apart (start: 2:15 AM, end: 2:15 PM)
    3. Click into end time text input to modify manually
    4. Change end time to 1 or more minutes earlier (end: 2:14 PM or earlier)

    You'll find that the end time resets to be even with the start time (end: 2:15 AM)

    opened by jksmall0631 0
  • Bump express from 4.17.1 to 4.18.2

    Bump express from 4.17.1 to 4.18.2

    Bumps express from 4.17.1 to 4.18.2.

    Release notes

    Sourced from express's releases.

    4.18.2

    4.18.1

    • Fix hanging on large stack of sync routes

    4.18.0

    ... (truncated)

    Changelog

    Sourced from express's changelog.

    4.18.2 / 2022-10-08

    4.18.1 / 2022-04-29

    • Fix hanging on large stack of sync routes

    4.18.0 / 2022-04-25

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump qs from 6.5.2 to 6.5.3

    Bump qs from 6.5.2 to 6.5.3

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge`: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(v3.0.0-alpha.8)
  • v3.0.0-alpha.8(Feb 6, 2022)

    Bug Fixes

    • Fix valid-hours and minute-increment props for input slot usage
    • Fix bug where date picker would reset null dates

    Improvements

    • Allow separate valid-hours and minute-increment for range dates
    Source code(tar.gz)
    Source code(zip)
  • v2.4.1(Feb 6, 2022)

    Bug Fixes

    • Fix valid-hours and minute-increment props for input slot usage
    • Fix bug where date picker would reset null dates

    Improvements

    • Allow separate valid-hours and minute-increment for range dates
    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-alpha.7(Feb 1, 2022)

    Bug Fixes

    • Fix defaults when using plugin
    • Fix iso mask
    • Fix broken navigation state when using max-date
    • Fix double arrows appearing in time picker when using Tailwind reset styles

    Improvements

    • Add valid-hours prop for time picker
    Source code(tar.gz)
    Source code(zip)
  • v2.4.0(Feb 1, 2022)

    Bug Fixes

    • Fix edge case when switching date modes
    • Fix double arrows appearing in time picker when using Tailwind reset styles

    Improvements

    • Add valid-hours prop
    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-alpha.6(Oct 7, 2021)

  • v2.3.4(Oct 6, 2021)

    Bug Fixes

    • Fix broken removal of event handlers in calendar and date picker
    • Dependabot updates

    Improvements

    • Remove custom click detection handlers for Mobile Safari
    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-alpha.5(Jul 13, 2021)

  • v2.3.1(Jul 13, 2021)

  • v3.0.0-alpha.4(May 4, 2021)

  • v2.3.0(Mar 13, 2021)

    Bug Fixes

    • Fix trim-weeks missing dates if firstDayOfWeek !== 1
    • Fix input format on calendar hide
    • Fix date range normalization for time and input updates

    Improvements

    • Add show-weeknumbers prop (Boolean | String) with support for left, left-outside, right or right-outside positions
    • Add weeknumberclick event that emits week data on click
    {
      weeknumber: Number, // Weeknumber clicked
      days: [Day], // List of day objects for the weeknumber clicked
      event: MouseEvent, // Native event emitted
    }
    
    Source code(tar.gz)
    Source code(zip)
  • v2.2.4(Feb 28, 2021)

    Bug Fixes

    • Set inheritAttrs to false for calendar pane component
    • Fix null dates for time picker when mode === 'time'

    Improvements

    • Add modelConfig.fillDate parameter to fill missing date parts
    • Provide popover options as defaults for showPopover, hidePopover, togglePopover
    Source code(tar.gz)
    Source code(zip)
  • v2.2.3(Feb 1, 2021)

  • v2.2.2(Jan 26, 2021)

  • v2.2.1(Jan 24, 2021)

    Bug Fixes

    • Fix bug with disabling certain month and year items if any min or max props are provided.

    Improvements

    • Disables navigation to next and previous groups of month and year items when needed. :tada:
    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Jan 11, 2021)

    Bug Fixes

    • Set timezone offset to 0 for ISO dates that end with Z
    • Adjust date timezone to UTC when formatting with masks that end with Z

    Enhancements

    • Use a default ISO mask for string dates that matches the browser: YYYY-MM-DDTHH:mm:ss.SSSZ
    • Add ZZ, ZZZ and ZZZZ mask tokens
    • Add unit tests for DatePicker and TimePicker with string dates
    Source code(tar.gz)
    Source code(zip)
  • v2.1.6(Jan 1, 2021)

  • v2.1.5(Dec 27, 2020)

  • v2.1.4(Dec 26, 2020)

    Bug Fixes

    • Fix popover.keepVisibleOnInput
    • Patch Media Query addEventListener for browsers < Safari 14, < Edge 16
    • Fix focus styles in navigation pane

    Enhancements

    • Remove dedicated Grid component to reduce DOM elements and package size
    • Remove unnecessary JS/CSS
    • Tighten min pane width to 250px
    Source code(tar.gz)
    Source code(zip)
  • v2.1.3(Dec 18, 2020)

    Bug Fixes

    • Toggle date value to null if date is re-selected and is-required is false. This only applies if is-range is false
    • Use is-required prop to prevent null date values on re-select or clearing input element
    • Prevent hiding picker if disabled date is selected

    Enhancements

    • Shortens picker popover hide delay to prevent multiple rapid date selections
    Source code(tar.gz)
    Source code(zip)
  • v2.1.2(Dec 14, 2020)

  • v3.0.0-alpha.2(Nov 24, 2020)

  • v2.1.1(Nov 18, 2020)

    • Fixes aria-label for calendar days
    • Adds trim-weeks prop for both calendars and date pickers
    • Adds force option to move and focusDate methods
    • Adds move and focusDate method wrappers to date picker
    • Convert move and focusDate to promise-based methods for compatibility
    • Adds showDelay and hideDelay options for date picker popover
    • Adds showDelay, hideDelay and transition options for attribute popovers
    Source code(tar.gz)
    Source code(zip)
  • v2.0.2(Nov 1, 2020)

    Enhancements

    Adds footer slot support for date pickers Adds popover.transition option (slide, slide-fade, none or ``) Uses passive touch handlers to prevent Chrome warning

    Bug Fixes

    Fixes single use of highlight.contentStyle or highlight.contentClass

    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Oct 25, 2020)

  • v2.0.0(Oct 24, 2020)

    v2.0.0

    This version introduces a significant number of breaking changes, all of which have been introduced to streamline component simplicity and size.

    Reference the guides below to help update your v-calendar and v-date-picker components to this version.

    Add @popperjs/core to dependencies

    Popper.js has been converted to a peer dependency to trim down the size of the package. As a result, @popperjs/core must be installed as a dependency within your application in order for popovers to work properly.

    Calendar Conversion Guide

    1. Use timezones (optional)
    2. Use footer scoped slot
    3. Attribute styles

    1. Use timezones (optional)

    Timezone support via timezone prop (UTC, America/Chicago, etc.)

    • Local timezone is used if not supplied (default)
    • Timezone names allowed (UTC, America/Chicago, etc.)
    • Uses Intl api for native browser date conversions

    Note: The timezone prop is optional and should only be used in special cases.

    2. Use footer scoped slot

    The footer slot may be used to place your own custom content at the bottom of the calendar.

    <v-calendar ref="calendar">
      <template v-slot:footer>
        <div class="bg-gray-100 text-center p-2 border-t rounded-b-lg">
          <button
            class="bg-blue-500 text-white font-medium px-2 py-1 rounded hover:bg-blue-600"
            @click="moveToToday"
          >
            Today
          </button>
        </div>
      </template>
    </v-calendar>
    
    export default {
      methods: {
        moveToToday() {
          this.$refs.calendar.move(new Date());
        },
      },
    };
    

    3. Attribute styles

    Style objects may now be assigned to attribution configuration objects via the following properties.

    | Attribute Type | Properties | | --- | --- | | highlight | style, contentStyle | | dot | style | | bar | style |

    <v-calendar :attributes="attributes" />
    
    export default {
      data() {
        return {
          attributes: [
            { dot: { style: { backgroundColor: 'brown' } }, dates: new Date() },
          ],
        };
      },
    };
    

    Date Picker Conversion Guide

    1. Use mode for new time picker
    2. Use is-range for date ranges
    3. Multiple dates deprecated
    4. Bind to date strings & numbers
    5. Set default times for date selections
    6. New time mask tokens
    7. Remove is-inline prop
    8. Remove input-props prop

    1. Use mode for new time picker

    The mode prop has been repurposed to enable date and/or time selection.

    Date Picker Only (default)

    Use date mode to select the date only. This is the default mode and is not strictly required.

    <v-date-picker v-model="date" mode="date" />
    

    Date & Time Picker

    Use dateTime mode to allow for selecting dates and times using the new time picker. Times are displayed and modified using the local timezone unless specified via the timezone prop.

    <v-date-picker v-model="date" mode="dateTime" />
    

    Time Picker Only

    Use time mode to select the time only.

    <v-date-picker v-model="date" mode="time" />
    

    2. Use is-range for date ranges

    Since the mode prop no longer can be used to select date ranges, use the is-range: Boolean prop to bind to date ranges.

    <v-date-picker mode="dateTime" v-model="dateRange" is-range>
    
    data() {
      return {
        dateRange: {
          start: new Date(2020, 0, 6),
          end: new Date(2020, 0, 10),
        }
      }
    }
    

    3. Multiple dates deprecated

    Multiple date selection mode has been deprecated in favor of using a slot to provide more flexible user interface patterns.

    4. Bind to date strings & numbers

    Previously, you could only bind to Javascript dates. Now it is possible to bind directly to string and number date values without manual conversion by setting the type and mask properties of the model-config prop.

    5. Set default times for date selections

    When the user selects a new date, it is now possible to auto-assign a default time value by setting the timeAdjust property of the model-config prop in HH:mm:ss format (use now for the current time of selection).

    By default, time values are left unchanged from the original date value unless this property is assigned.

    6. New time mask tokens

    New mask tokens have been added to support user time entry. When providing your own input element as a default slot, use the masks.input setting with the tokens below to allow the user to type in their own times.

    <v-date-picker v-model="date" mode="dateTime" :masks="masks">
      <template v-slot="{ inputValue, inputEvents }">
        <input
          class="bg-white border px-2 py-1 rounded"
          :value="inputValue"
          v-on="inputEvents"
        />
      </template>
    </v-date-picker>
    
    export default {
      data() {
        return {
          date: new Date(),
          masks: {
            input: 'YYYY-MM-DD h:mm A',
          },
        };
      },
    };
    

    | | Token | Output | | --- | --- | --- | | Hour | h | 1 2 ... 11 12 | | | hh| 01 02 ... 11 12 | | | H | 0 1 ... 22 23 | | | HH| 00 01 ... 22 23 | | Minute | m | 0 1 ... 58 59 | | | mm | 00 01 ... 58 59 | | Second | s | 0 1 ... 58 59 | | | ss | 00 01 ... 58 59 | | AM/PM | a | am pm | | | A | AM PM | | Timezone | X | -07 -06 ... +06 +07 | | | XX | -0700 -0600 ... +0600 +0700 | | | XXX | -07:00 -06:00 ... +06:00 +07:00 |

    7. Remove is-inline prop

    v-date-picker now automatically displays pickers inline if no default slot is provided. This allows for the removal of the is-inline prop.

    <v-date-picker v-model="date">
    
    data() {
      return {
        date: new Date()
      }
    }
    

    Any default slot provided will display the picker as a popover.

    <v-date-picker v-model="date">
      <template v-slot="{ inputValue, inputEvents }">
        <input
          class="bg-white border px-2 py-1 rounded"
          :value="inputValue"
          v-on="inputEvents"
        />
      </template>
    </v-date-picker>
    

    8. Remove input-props prop

    Since default slots are no longer provided, the input-props prop has been deprecated. When providing your own input elements in a default slot, bind to the input-value prop provided by the slot.

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-beta.0(Oct 16, 2020)

    v2.0.0-beta.0

    This version introduces a significant number of breaking changes, all of which have been introduced to streamline component simplicity and size.

    Reference the guides below to help update your v-calendar and v-date-picker components to this version.

    Add @popperjs/core to dependencies

    Popper.js has been converted to a peer dependency to trim down the size of the package. As a result, @popperjs/core must be installed as a dependency within your application in order for popovers to work properly.

    Calendar Conversion Guide

    1. Use timezones (optional)
    2. Use footer scoped slot
    3. Attribute styles

    1. Use timezones (optional)

    Timezone support via timezone prop (UTC, America/Chicago, etc.)

    • Local timezone is used if not supplied (default)
    • Timezone names allowed (UTC, America/Chicago, etc.)
    • Uses Intl api for native browser date conversions

    Note: The timezone prop is optional and should only be used in special cases.

    2. Use footer scoped slot

    The footer slot may be used to place your own custom content at the bottom of the calendar.

    <v-calendar ref="calendar">
      <template v-slot:footer>
        <div class="bg-gray-100 text-center p-2 border-t rounded-b-lg">
          <button
            class="bg-blue-500 text-white font-medium px-2 py-1 rounded hover:bg-blue-600"
            @click="moveToToday"
          >
            Today
          </button>
        </div>
      </template>
    </v-calendar>
    
    export default {
      methods: {
        moveToToday() {
          this.$refs.calendar.move(new Date());
        },
      },
    };
    

    3. Attribute styles

    Style objects may now be assigned to attribution configuration objects via the following properties.

    | Attribute Type | Properties | | --- | --- | | highlight | style, contentStyle | | dot | style | | bar | style |

    <v-calendar :attributes="attributes" />
    
    export default {
      data() {
        return {
          attributes: [
            { dot: { style: { backgroundColor: 'brown' } }, dates: new Date() },
          ],
        };
      },
    };
    

    Date Picker Conversion Guide

    1. Use mode for new time picker
    2. Use is-range for date ranges
    3. Multiple dates deprecated
    4. Bind to date strings & numbers
    5. Set default times for date selections
    6. New time mask tokens
    7. Remove is-inline prop
    8. Remove input-props prop

    1. Use mode for new time picker

    The mode prop has been repurposed to enable date and/or time selection.

    Date Picker Only (default)

    Use date mode to select the date only. This is the default mode and is not strictly required.

    <v-date-picker v-model="date" mode="date" />
    

    Date & Time Picker

    Use dateTime mode to allow for selecting dates and times using the new time picker. Times are displayed and modified using the local timezone unless specified via the timezone prop.

    <v-date-picker v-model="date" mode="dateTime" />
    

    Time Picker Only

    Use time mode to select the time only.

    <v-date-picker v-model="date" mode="time" />
    

    2. Use is-range for date ranges

    Since the mode prop no longer can be used to select date ranges, use the is-range: Boolean prop to bind to date ranges.

    <v-date-picker mode="dateTime" v-model="dateRange" is-range>
    
    data() {
      return {
        dateRange: {
          start: new Date(2020, 0, 6),
          end: new Date(2020, 0, 10),
        }
      }
    }
    

    3. Multiple dates deprecated

    Multiple date selection mode has been deprecated in favor of using a slot to provide more flexible user interface patterns.

    4. Bind to date strings & numbers

    Previously, you could only bind to Javascript dates. Now it is possible to bind directly to string and number date values without manual conversion by setting the type and mask properties of the model-config prop.

    5. Set default times for date selections

    When the user selects a new date, it is now possible to auto-assign a default time value by setting the timeAdjust property of the model-config prop in HH:mm:ss format (use now for the current time of selection).

    By default, time values are left unchanged from the original date value unless this property is assigned.

    6. New time mask tokens

    New mask tokens have been added to support user time entry. When providing your own input element as a default slot, use the masks.input setting with the tokens below to allow the user to type in their own times.

    <v-date-picker v-model="date" mode="dateTime" :masks="masks">
      <template v-slot="{ inputValue, inputEvents }">
        <input
          class="bg-white border px-2 py-1 rounded"
          :value="inputValue"
          v-on="inputEvents"
        />
      </template>
    </v-date-picker>
    
    export default {
      data() {
        return {
          date: new Date(),
          masks: {
            input: 'YYYY-MM-DD h:mm A',
          },
        };
      },
    };
    

    | | Token | Output | | --- | --- | --- | | Hour | h | 1 2 ... 11 12 | | | hh| 01 02 ... 11 12 | | | H | 0 1 ... 22 23 | | | HH| 00 01 ... 22 23 | | Minute | m | 0 1 ... 58 59 | | | mm | 00 01 ... 58 59 | | Second | s | 0 1 ... 58 59 | | | ss | 00 01 ... 58 59 | | AM/PM | a | am pm | | | A | AM PM | | Timezone | X | -07 -06 ... +06 +07 | | | XX | -0700 -0600 ... +0600 +0700 | | | XXX | -07:00 -06:00 ... +06:00 +07:00 |

    7. Remove is-inline prop

    v-date-picker now automatically displays pickers inline if no default slot is provided. This allows for the removal of the is-inline prop.

    <v-date-picker v-model="date">
    
    data() {
      return {
        date: new Date()
      }
    }
    

    Any default slot provided will display the picker as a popover.

    <v-date-picker v-model="date">
      <template v-slot="{ inputValue, inputEvents }">
        <input
          class="bg-white border px-2 py-1 rounded"
          :value="inputValue"
          v-on="inputEvents"
        />
      </template>
    </v-date-picker>
    

    8. Remove input-props prop

    Since default slots are no longer provided, the input-props prop has been deprecated. When providing your own input elements in a default slot, bind to the input-value prop provided by the slot.

    Source code(tar.gz)
    Source code(zip)
  • v0.9.6(Apr 16, 2018)

    Bug Fixes

    v-date-picker

    • Fixes bug where calling slot method updateValue with formatInput: false was not working.
    • Rename update-on-input-keyup prop to simply update-on-input.

    defaults

    • Rename datePickerUpdateOnInputKeyup to simply datePickerUpdateOnInput.
    Source code(tar.gz)
    Source code(zip)
  • v0.9.5(Apr 14, 2018)

    Improvements

    v-calendar

    • :tada: :tada: :tada: Adds support for 'day-content' slots. This adds a lot of flexibility by allowing you to provide your own day cells. The layout has also been improved to grow with your cells, so you can now build larger calendars to fill with your own content.
    <v-calendar>
      <div
        slot='day-content'
        slot-scope='{ day, attributes, contentStyle }'
        class='my-day'>
        <!-- Be sure to display the day of the month somewhere in your content -->
        {{ day.day }}
      </div>
    </v-calendar>
    
    /* Set width and height and `v-calendar` will resize appropriately */
    .my-day {
      width: 40px;
      height: 40px;
    }
    /* You can also apply your own hover styles */
    .my-day:hover {
      background-color: #dadada;
    }
    

    You can get access to the following slot props:

    | Prop | Type | Description | | ---- | ---- | ----------- | | day | Object | Object with various day info. Use the day.day number prop to display the day of month in your slot content. | | attibutes | Array | List of attributes for this day. | | contentStyle | Object | Content style to apply if you wish, derived from themeStyles.dayContent and other attributes. |

    Source code(tar.gz)
    Source code(zip)
  • v0.9.4(Apr 13, 2018)

  • v0.9.3(Apr 12, 2018)

    Bug Fixes

    v-calendar

    • Fix bug where initial update:frompage and update:topage events missing page argument. Closes #125.

    v-date-picker

    • Fix bug where formats prop not getting forwarded to v-calendar. Closes #123.

    popover

    • Modify tabindex to improve tab navigation. Closes #119.
    • Fix bug where content container element was overflowing window on mobile.

    Improvements

    v-date-picker

    • Improve input key handing, specifically for enter and esc keys
    • Added update-on-input-keyup prop to update picker selection on every keyup event.
    • Custom slot method updateValue can now accept options as the second parameter. Closes #118.

    | Property | Description | Default Value | | -------- | ----------- | ------------- | | formatInput | If new value is valid, date picker should reformat the inputValue (based on formats.input). | true | | hidePopover | If new valud is valid, date picker should hide popover. | !popoverKeepVisibleOnInput |

    So, by default, without using a custom input slot, v-date-picker will have the following behavior when the input control has focus

    | Action | Update w/ Value | formatInput | hidePopover | | ----- | ----- | ----- | ----- | | enter keyup (change event) | Input value | true | false | | esc keyup | Last value (input ignored) | true | true | | Any other keyup | Input value if update-on-input-keyup === true. None otherwise. | false | false |

    Here is an example of passing the parameters with a custom slot.

    <v-date-picker
      v-model='date'>
      <input
        slot-scope='{ inputValue, updateValue }'
        :value='inputValue'
        @change='updateValue(inputValue, { formatInput: true, hidePopover: false })'
        @keyup='updateValue(inputValue, { formatInput: false, hidePopover: false })' />
    </v-date-picker>
    

    defaults

    • Added datePickerUpdateOnKeyup as default value for v-date-picker.update-on-keyup prop.
    Source code(tar.gz)
    Source code(zip)
Owner
Nathan Reyes
Enthusiast for all things front-end.
Nathan Reyes
Contra - Combines GitHub and GitLab contributions calendar to create a single calendar

Welcome to Contra ?? Combines GitHub and GitLab contributions calendar to create

Ahmet Korkmaz 10 Dec 29, 2022
Simple-calendar-app - Simple Vue calendar (date-picker)

Simple vue calendar (date-picker) Vue Moment.js Installation git clone npm i npm

Dmitry Chinenov 3 Oct 31, 2022
easy datepicker of a vue 2.0 component

vue-datepicker-infinite easy datepicker of a vue 2.0 component install npm install vue2-datepicker-infinite --save how to use template: <transition

Chen Leepyng 16 Nov 24, 2022
Datepicker Component For Vue

Vue Datepicker Component A Datepicker Component For VueJs (https://edisdev.github.io/vue-datepicker-ui) Props <Calendar v-model="" :range

Hatice Edis 404 Dec 20, 2022
A datepicker / datetimepicker component for Vue2

vue2-datepicker 中文版 A Datepicker Component For Vue2 Demo https://mengxiong10.github.io/vue2-datepicker/index.html Install $ npm install vue2-datepicke

也无风雨 1.4k Dec 26, 2022
VueJS wrapper component for Pikaday datepicker

Vue Pikaday VueJS wrapper component for Pikaday datepicker Install npm i -D @netcz/vue-pikaday or yarn add -D @netcz/vue-pikaday Usage Please consult

Michal Szajter 37 Sep 10, 2021
A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS

Pikaday A refreshing JavaScript Datepicker Lightweight (less than 5kb minified and gzipped) No dependencies (but plays well with Moment.js) Modular CS

null 7.9k Dec 31, 2022
Simple and clean calendar written in Vue.js

Vuelendar Simple and clean calendar written in Vue.js. Check out full Vuelendar's documentation here. Features Select single date Select range of date

The Codest 76 Oct 5, 2022
📅 A feature-rich calendar component, support multiple modes and gesture sliding. For vue 3.0+

?? A calendar component for vue3.0. Support gesture sliding, range selection, according to the week switch...

飞翔的荷兰人 434 Jan 3, 2023
A simple and sweet vue.js calendar

vue-sweet-calendar A simple and sweet vue.js calendar Features Showing Multiple-Events Fully customizable How to install npm install vue-sweet-calenda

Mahdi Aryayi 35 Oct 5, 2022
A simple vue calendar component. Base for further development and styling.

vue-simple-calendar A simple vue calendar component with minimal css. A base for further development/styling. DEMO Dependencies date-fns, lodash-es In

Roman Ranniew 6 Jun 15, 2022
Full calendar base on Vue2 and momentjs.

Vue2 Calendar Component Full calendar base on Vue2 and dayjs. Support month and week view. Custom date item style with scopeSlots. 中文文档 ?? Live demo I

Kit 75 Nov 11, 2022
A responsive and customizable Github heatmap calendar.

vue-github-calendar A responsive and customizable Github heatmap calendar for Vue.js Usage Install npm install vue-github-calendar Import the componen

Antoine Carat 4 Mar 18, 2021
vue calendar fullCalendar. no jquery required. Schedule events management

##vue-fullcalendar Works for Vue2 now. This is a fullCalendar component based on vue.js . No Jquery or fullCalendar.js required. Currently, It only su

Sunny Wang 1.5k Dec 18, 2022
A vue component for lunar calendar.

vue-lunar-calendar A vue component for lunar calendar. Uses Moment.js for date operations. This is the Korean lunar calendar. It is different from Chi

Kim WooHyun 70 Aug 20, 2022
Simple Vue component to show a month-grid calendar with events

VueSimpleCalendar Introduction vue-simple-calendar is a flexible, themeable, lightweight calendar component for Vue that supports multi-day scheduled

Richard Tallent 762 Jan 3, 2023
A simple infinite calendar component in Vue 2

vue-infinite-calendar A simple infinite calendar component in Vue 2 Build Setup # install dependencies npm install # serve with hot reload at localho

Rares S 15 Feb 28, 2022
A calendar component for Vue.js

calendar Chinese This is a calendar component based on vue.js . support custom content. No dependencies. Currently, It only supports month view. You c

Kylin 47 Aug 16, 2022
vue 2.x calendar component

vue2-calendar vue 2 calendar, datepicker component which supported lunar or date event Live Demo >> This project is not only a vue component, but also

Terry Cai 485 Dec 18, 2022