vue2-datepicker
Advanced tools
Changelog
3.0.2 (2019-11-14)
[null, null]
when clear a range (635631f)partial-update
. It'll update the date when select year or month in type='date'
or type='datetime'
(07f4271)<a name="3.0.1"></a>
Changelog
3.0.0 (2019-11-10)
Add week picker
<date-picer type="week" />
Add inline calendar without input
<date-picker inline />
Add prop open
to control the state of popup
Add select am/pm, when use12hours
Add event open
and close
Add hourStep
/minuteStep
/secondStep
/showHour
/showMinute
/showSecond
/use12h
to time picker for more configuration
Need to import style separately
Change the default language to English. And need to import file to change the language.
Range selection refactoring, you can select a range on one calendar now, and need to click twice to select a range each time.
Change slot calendar-icon
to icon-calendar
.
appendToBody
default value changes from false to true.
Remove not-before
and not-after
, use disabledDate
instead.
<template>
<date-picker :disabled-date="notBeforeToday"></date-picker>
<date-picker :disabled-date="notAfterToday"></date-picker>
</template>
<script>
export default {
methods: {
notBeforeToday(date) {
const today = new Date();
today.setHours(0, 0, 0, 0);
return date.getTime() < today.getTime();
},
notAfterToday(date) {
const today = new Date();
today.setHours(0, 0, 0, 0);
return date.getTime() > today.getTime();
},
},
};
</script>
Remove width
, use style="{ width: "" }"
instead.
modify shortcuts
api.
[
{ text: 'today', onClick: () => new Date() // return a Date }
];
Remove prop firstDayOfWeek
to locale.
Changelog
3.0.0 (2019-11-10)
Add week picker
<date-picer type="week" />
Add inline calendar without input
<date-picker inline />
Add prop open
to control the state of popup
Add select am/pm, when use12hours
Add event open
and close
Add hourStep
/minuteStep
/secondStep
/showHour
/showMinute
/showSecond
/use12h
to time picker for more configuration
Need to import style separately
Change the default language to English. And need to import file to change the language.
Range selection refactoring, you can select a range on one calendar now, and need to click twice to select a range each time.
Change slot calendar-icon
to icon-calendar
.
appendToBody
default value changes from false to true.
Remove not-before
and not-after
, use disabledDate
instead.
<template>
<date-picker :disabled-date="notBeforeToday"></date-picker>
<date-picker :disabled-date="notAfterToday"></date-picker>
</template>
<script>
export default {
methods: {
notBeforeToday(date) {
const today = new Date();
today.setHours(0, 0, 0, 0);
return date.getTime() < today.getTime();
},
notAfterToday(date) {
const today = new Date();
today.setHours(0, 0, 0, 0);
return date.getTime() > today.getTime();
},
},
};
</script>
Remove width
, use style="{ width: "" }"
instead.
modify shortcuts
api.
[
{ text: 'today', onClick: () => new Date() // return a Date }
];
Remove prop firstDayOfWeek
to locale.