From 73eebac5d669bb4c00e5d06e74ca22a6e94b468d Mon Sep 17 00:00:00 2001 From: QiuShuiBai <33334963+QiuShuiBai@users.noreply.github.com> Date: Tue, 9 Mar 2021 15:25:24 +0800 Subject: [PATCH] Change the props max default value of date-picker (#763) * chore(eslint): fix some eslint bugs * feat(date-picker): set max default value according to the current time 760 --- document/common/js/highlight.js | 2 +- document/components/docs/en-US/date-picker.md | 4 ++-- document/components/docs/zh-CN/date-picker.md | 4 ++-- example/components/json-view.vue | 2 +- src/components/date-picker/date-picker.vue | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/document/common/js/highlight.js b/document/common/js/highlight.js index 4c96bc04..0570ab81 100644 --- a/document/common/js/highlight.js +++ b/document/common/js/highlight.js @@ -1,4 +1,4 @@ -import hljs from 'highlight.js/lib/highlight' +import hljs from 'highlight.js/lib/highlight' import shell from 'highlight.js/lib/languages/shell' import css from 'highlight.js/lib/languages/css' diff --git a/document/components/docs/en-US/date-picker.md b/document/components/docs/en-US/date-picker.md index 8b5703a4..e7ef39e6 100644 --- a/document/components/docs/en-US/date-picker.md +++ b/document/components/docs/en-US/date-picker.md @@ -263,8 +263,8 @@ __Notice:__ Cause this component used create-api, so you should read [create-api | Attribute | Description | Type | Accepted Values | Default | Example | | - | - | - | - | - | - | -| min | the minimum value of optional range | Date, Array | - | new Date(2010, 1, 1) | new Date(2008, 7, 8) | -| max | the maximum value of optional range | Date, Array | - | new Date(2020, 12, 31) | new Date(2020, 9, 20) | +| min | the minimum value of optional range | Date, Array | - | new Date(2010, 0, 1) | new Date(2008, 7, 8) | +| max | the maximum value of optional range | Date, Array | - | December 31 of next year based on current time [new Date().getFullYear() + 1, 12, 31, 23, 59, 59] | new Date(2020, 9, 20) | | value | current selected Date | Date, Array | - | the minimum value of optional range | new Date() | | startColumn | the start column | String | year/month/date/hour/minute/second| year | hour | | columnCount | the count of column | Number | - | 3 | 6 | diff --git a/document/components/docs/zh-CN/date-picker.md b/document/components/docs/zh-CN/date-picker.md index a2b9bc83..ba8592f9 100644 --- a/document/components/docs/zh-CN/date-picker.md +++ b/document/components/docs/zh-CN/date-picker.md @@ -263,8 +263,8 @@ __注:__ 由于此组件基于 create-api 实现,所以在使用之前,请 | 参数 | 说明 | 类型 | 可选值 | 默认值 | 示例 | | - | - | - | - | - | - | -| min | 可选范围的最小值 | Date, Array | - | new Date(2010, 1, 1) | new Date(2008, 7, 8) | -| max | 可选范围的最大值 | Date, Array | - | new Date(2020, 12, 31) | new Date(2020, 9, 20) | +| min | 可选范围的最小值 | Date, Array | - | new Date(2010, 0, 1) | new Date(2008, 7, 8) | +| max | 可选范围的最大值 | Date, Array | - | 当前时间未来一年的12月31日,[new Date().getFullYear() + 1, 12, 31, 23, 59, 59] | new Date(2020, 9, 20) | | value | 当前选择的日期 | Date, Array | - | 可选范围的最小值 | new Date() | | startColumn | 起始列 | String | year/month/date/hour/minute/second| year | hour | | columnCount | 列数 | Number | - | 3 | 6 | diff --git a/example/components/json-view.vue b/example/components/json-view.vue index fe7967c0..f2a92cac 100644 --- a/example/components/json-view.vue +++ b/example/components/json-view.vue @@ -8,7 +8,7 @@