mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
fix(Canlendar): fix default-date invalid (#4430)
* fix(Canlendar): fix default-date invalid * fix(Calendar): update doc
This commit is contained in:
parent
0b273fc037
commit
ca9ffd8269
@ -270,9 +270,9 @@ Page({
|
||||
| type | 选择类型:<br>`single`表示选择单个日期,<br>`multiple`表示选择多个日期,<br>`range`表示选择日期区间 | _string_ | `single` |
|
||||
| title | 日历标题 | _string_ | `日期选择` |
|
||||
| color | 主题色,对底部按钮和选中日期生效 | _string_ | `#ee0a24` |
|
||||
| min-date | 可选择的最小日期 | _number_ | 当前日期 |
|
||||
| max-date | 可选择的最大日期 | _number_ | 当前日期的六个月后 |
|
||||
| default-date | 默认选中的日期,`type`为`multiple`或`range`时为数组 | _number \| number[]_ | 今天 |
|
||||
| min-date | 可选择的最小日期 | _timestamp_ | 当前日期 |
|
||||
| max-date | 可选择的最大日期 | _timestamp_ | 当前日期的六个月后 |
|
||||
| default-date | 默认选中的日期,`type`为`multiple`或`range`时为数组 | _timestamp \| timestamp[]_ | 今天 |
|
||||
| row-height | 日期行高 | _number \| string_ | `64` |
|
||||
| formatter | 日期格式化函数 | _(day: Day) => Day_ | - |
|
||||
| poppable | 是否以弹层的形式展示日历 | _boolean_ | `true` |
|
||||
|
@ -132,7 +132,7 @@ VantComponent({
|
||||
|
||||
created() {
|
||||
this.setData({
|
||||
currentDate: this.getInitialDate(),
|
||||
currentDate: this.getInitialDate(this.data.defaultDate),
|
||||
});
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user