mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-23 00:00:35 +03:00
docs: update v3.0 log
This commit is contained in:
@@ -41,6 +41,30 @@
|
|||||||
- Change slot `calendar-icon` to `icon-calendar`.
|
- Change slot `calendar-icon` to `icon-calendar`.
|
||||||
- `appendToBody` default value changes from false to true.
|
- `appendToBody` default value changes from false to true.
|
||||||
- Remove `not-before` and `not-after`, use `disabledDate` instead.
|
- Remove `not-before` and `not-after`, use `disabledDate` instead.
|
||||||
|
|
||||||
|
```html
|
||||||
|
<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.
|
- Remove `width`, use `style="{ width: '' }"` instead.
|
||||||
- modify `shortcuts` api.
|
- modify `shortcuts` api.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user