A simple datepicker component for vue3.0

Overview

vue3-datepicker-lite

SampleGif

A simple datepicker component support Vue3.0!!

DEMO

Online Demo

SampleCode

import

import DatepickerLite from "vue3-datepicker-lite";

component


sample data

const datepickerSetting = {
  id: "birthday",
  name: "birthday",
  class: "myDateInput",
  value: "2020/10/01",
  placeholder: "Select",
  isButtonType: false,
  yearMinus: 0,
  fromDate: "2020/02/10",
  toDate: "2021/02/10",
  disabledDate: [
    "2020/10/02",
    "2020/10/03",
    "2020/10/04",
    "2020/10/05",
    "2020/10/06",
  ],
  locale: {
    format: "YYYY/MM/DD",
    weekday: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
    startsWeeks: 0,
    todayBtn: "Today",
    clearBtn: "Clear",
    closeBtn: "Close",
  },
  changeEvent: (value) => {
    console.log(value + " selected!");
  },
  disableInput: false,
}

release

ver 1.8.8 : added switch to button-type option
ver 1.8.7 : added autocomplated off option
ver 1.8.6 : fixed datepicker on window bottom will be over window height bug
ver 1.8.5 : fixed locale attribute bug
ver 1.8.4 : supported start weeks option
ver 1.8.3 : fixed disabledDate not work bug
ver 1.8.2 : fixed valueAttr can not to be null bug
ver 1.8.1 : supported placeholder
ver 1.8.0 : supported value-attr responsive
ver 1.7.0 : supported disable input
ver 1.6.0 : supported date format
Comments
  •  Clicked clear value then reopen datepicker yearMinus have some problem.

    Clicked clear value then reopen datepicker yearMinus have some problem.

    Hi , I have some problem with yearMinus. When I clicked clear then reopen datepicker yearMinus have some problem.

    Library Version : 1.9.2

    image

    My Settings

    const datepickerSetting = {
          class: "myDateInput",
          value: "01/12/2564",
          placeholder: "โปรดเลือก",
          yearMinus: -543,
          fromDate: "02/10/2400",
          toDate: "",
          disabledDate: [],
          locale: {
            format: "DD/MM/YYYY",
            weekday: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส"],
            startsWeeks: 0,
            todayBtn: "Today",
            clearBtn: "Clear",
            closeBtn: "Close"
          },
          changeEvent: value => {
            return value;
          },
          disableInput: false
        };
    

    Thank You So Much.

    opened by gottenwit 7
  • Make date field a button

    Make date field a button

    It would be nice if the part of the component that you click to show the calendar was a simple button. Right now, it's a text field, but this is annoying when you're on a mobile device or smart TV as clicking on it results in the keyboard coming up.

    opened by sknick 3
  •   :years-range=

    :years-range="10" not working,kindly check

    <datepicker-lite :id-attr="fromDatepickerSetting.id" :name-attr="fromDatepickerSetting.name" :class-attr="fromDatepickerSetting.class" :value-attr="fromDatepickerSetting.value" :autocomplete-attr="fromDatepickerSetting.autocomplete" :placeholder-attr="fromDatepickerSetting.placeholder" :is-button-type="fromDatepickerSetting.isButtonType" :year-minus="fromDatepickerSetting.yearMinus" :years-range="10" :from="fromDatepickerSetting.fromDate" :to="fromDatepickerSetting.toDate" :locale="fromDatepickerSetting.locale" :disableInput="fromDatepickerSetting.disableInput" @value-changed="fromDatepickerSetting.changeEvent" ref="fromDateTemplateRef" @input="checkStartDate()" >

    opened by ravindrayr 2
  • Append to body

    Append to body

    It would be helpful if there were a prop that would allow the date panel to be placed above all elements instead of inline. This would alleviate a case as such that the datepicker might be hidden/cut off if placed in a fixed/sticky container with a height that is lesser than the size of the date panel and cannot overlap other sibling containers in the whole of the layout. Example of an issue I ran into attached. unknown .

    opened by bryan-andersen 2
  • Default value not working

    Default value not working

    Hello!

    I'm trying to set the default value of the date picker. Looking in the code, it seems that the date is being added to the div that is surrounding the text input. However, the input field itself does not display the date. Do you have any clue how to fix this?

    Cheers!

    My code:

    <DatepickerLite
            :name-attr="name"
            class-attr="form-control" :class="errors.length > 0 ? 'is-invalid' : ''"
            :value="modelValue"     <=== "2020-12-30"
            :locale="localeSettings"
            @valueChanged="updateValue"
    />
    
    .....
    
    const localeSettings = computed(() => {
            return {
              format: props.displayFormat, // "DD-MM-YYYY"
              weekday: [
                i18n.t('datepicker.mon'),
                i18n.t('datepicker.tue'),
                i18n.t('datepicker.wed'),
                i18n.t('datepicker.thu'),
                i18n.t('datepicker.fri'),
                i18n.t('datepicker.sat'),
                i18n.t('datepicker.sun'),
              ],
              startsWeeks: 1,
              todayBtn: i18n.t('datepicker.today'),
              clearBtn: i18n.t('datepicker.clear'),
              closeBtn: i18n.t('datepicker.close'),
            }
          })
    

    Screenshot: Screenshot 2021-02-14 at 22 25 57

    opened by XanderTenBoden 2
  • From date is incorrectly calculated

    From date is incorrectly calculated

    Hello,

    Thank you for the library. For me, from date setting is not working. For the setting object below, I can navigate to January, February, and March, but all dates in January and February are disabled. Only March is enabled. To Date and Disabled dates work as expected. Can you help please? Thank you.

    datepickerSetting: { id: "birthday", name: "birthday", class: "myDateInput", value: "2021/01/09", placeholder: "Select", yearMinus: 0, fromDate: "2021/01/02", toDate: "2021/03/31", disabledDate: [ "2021/03/02", "2021/03/19", ], locale: { format: "YYYY/MM/DD", weekday: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], todayBtn: "Today", clearBtn: "Clear", closeBtn: "Close", }, changeEvent: (value) => { console.log(value + " selected!"); }, disableInput: false, }

    opened by sivabudati 2
  • YearMinus attribute and limited date range has bug

    YearMinus attribute and limited date range has bug

    1. YearMinus attribute not work.
    2. If set fromDate attribute only, limited date range not work.
    3. If set limited date range and clear value, value will be wrong date.
    bug 
    opened by linmasahiro 0
  • Added option to disable browser input autocomplete

    Added option to disable browser input autocomplete

    I've added the option to disable the browser's autocomplete. This makes sure that the browser does not longer suggests formerly used values in the input which show up in front of the calendar popup.

    opened by XanderTenBoden 0
Releases(v1.9.6)
Owner
Lin Masahiro
Lin Masahiro
This datepicker is a fully customisable Vue(v2.1.6) version of the material-ui datepicker

vue-material-datepicker This datepicker is a fully customisable Vue(v2.1.6) version of the material-ui datepicker that fit all your projects. See belo

Bastien Granger 54 Dec 13, 2021
A simple datepicker component for vue3.0

A simple datepicker component for vue3.0

Lin Masahiro 34 Dec 14, 2022
A simple Vue.js datepicker component. Supports disabling of dates, inline mode, translations

Datepicker A datepicker Vue component. Compatible with Vue 2.x Demo Install Usage Date Formatting Props Events Disabled dates Highlighted dates Transl

Charlie Kassel 2.6k Jan 3, 2023
Simple datepicker component for Vue 3

Simple datepicker component for Vue 3

Ilya Borovitinov 111 Dec 17, 2022
A simple Vue.js datepicker component. Supports disabling of dates, inline mode, translations

Datepicker 2 A datepicker Vue component. Compatible with Vue 2.x Demo Install Upgrade to 2.x+ Usage Date Formatting Props Events Disabled dates Highli

hokify 15 Jul 28, 2022
[Deprecated] calendar and datepicker component with material design for Vue.js

vue-datepicker calendar and datepicker component with material design for Vue.js Demo The demo page is HERE. Requirements Vue.js ^1.0.0 & ^2.0.0 momen

Awe 706 Nov 21, 2022
A vue component that provides datepicker for persian developers

vue persian datepicker This is a Jalali date picker component for Vue. این برنامه یک کامپوننت انتخاب تاریخ جلالی می باشد. Demo You can see a demo and

Dyon Software Development Group 100 Oct 1, 2022
A Beautiful Datepicker Component For Vue2

vue-datepicker-local A Beautiful Datepicker Component For Vue2 Lightweight (less than 5kb minified and gzipped) Only dependencies Vue Beautiful! Demo

飞越 300 Dec 13, 2022
datepicker component for Vue 2.x

vue-date-picker datepicker component for Vue 2.x Screenshot Instllation $ npm install vue-date-picker --save Usage <template> <div class="demo">

8788 101 Nov 21, 2022
Litepie Datepicker is a date range picker component for Vue.js and Tailwind CSS, dependent to day.js.

Litepie Datepicker is a date range picker component for Vue.js and Tailwind CSS, dependent to day.js. Documentation For full documentation, visit lite

Ken 346 Jan 3, 2023
awesome, zero dependency, performant Vue datepicker component

awesome, zero dependency, performant Vue datepicker component

mohammad S. 36 Oct 31, 2022
Vue Datepicker Component

Datepicker Component For Vue

Hatice Edis 405 Jan 5, 2023
Datepicker component for Vue 3

The most complete date picker solution for Vue 3

null 158 Dec 27, 2022
Datepicker component for vue.js built with Tailwind CSS, and the day.js date library.

Datepicker component for vue.js build with Tailwind CSS & dayjs date library

Ken 188 Nov 11, 2022
Vue draggable datepicker component

DraggableCal A datepicker Vue component. Compatible with Vue 2.x Demo Install Usage Available Languages Dev & Build Licence Thanks Demo To view a demo

null 3 Feb 5, 2022
A lightweight and easy to use Vue.js datepicker component

A lightweight and easy to use Vue.js datepicker component (created for Vue 2.x)

Matt Areddia 0 Feb 5, 2019
Vue Nuxt Scroll Datepicker - Fast, powerful and easy to use component datetime picker for Nuxt Vue

Vue Nuxt Scroll Datepicker - Cashbac In this article, we’ll look at how date and time picker and a virtual scroll. Fast, powerful and easy to use comp

mohammad ichlas 2 Apr 25, 2022
Jalaali calendar and datepicker for vue.js 2

vue-jalaali-datepicker Jalaali calendar and datepicker for vue.js 2 Demo Requirements Vue.js ^2.0.0 moment-jalaali ^0.6.0 Installation npm $ npm insta

Peyman 13 Nov 24, 2022
Not your ordinary datepicker. A Vuejs draggable date selector with a fresh responsive design, mobile ready and 0 dependencies, 17kb gzipped

DraggableCal A datepicker Vue component. Compatible with Vue 2.x Demo Install Usage Available Languages Dev & Build Licence Thanks Demo To view a demo

Tom 86 Dec 1, 2022