2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-08 07:32:27 +03:00

docs: update v3.0 log

This commit is contained in:
mengxiong10
2019-11-11 18:23:38 +08:00
parent e32299d6a7
commit 741fcf8d7b
+24
View File
@@ -41,6 +41,30 @@
- Change slot `calendar-icon` to `icon-calendar`.
- `appendToBody` default value changes from false to true.
- 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.
- modify `shortcuts` api.