未验证 提交 73eebac5 编写于 作者: Q QiuShuiBai 提交者: GitHub

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
上级 ffcd3c42
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'
......
......@@ -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 |
......
......@@ -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 |
......
......@@ -8,7 +8,7 @@
</template>
<script type="text/ecmascript-6">
import hljs from 'highlight.js/lib/highlight'
import hljs from 'highlight.js/lib/highlight'
import json from 'highlight.js/lib/languages/json'
import 'highlight.js/styles/solarized-dark.css'
hljs.registerLanguage('json', json)
......
......@@ -75,7 +75,7 @@
max: {
type: [Date, Array],
default() {
return new Date(2020, 11, 31)
return [new Date().getFullYear() + 1, 12, 31, 23, 59, 59]
}
},
startColumn: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册