mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
docs(DatetimePicker): udpate example code @rex-zsd (#928)
This commit is contained in:
parent
42ab8ee7ee
commit
4627c8650c
@ -28,9 +28,9 @@ Page({
|
|||||||
data: {
|
data: {
|
||||||
minHour: 10,
|
minHour: 10,
|
||||||
maxHour: 20,
|
maxHour: 20,
|
||||||
minDate: new Date(),
|
minDate: new Date().getTime(),
|
||||||
maxDate: new Date(2019, 10, 1),
|
maxDate: new Date(2019, 10, 1).getTime(),
|
||||||
currentDate: new Date()
|
currentDate: new Date().getTime()
|
||||||
},
|
},
|
||||||
onChange(event) {
|
onChange(event) {
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -54,8 +54,8 @@ Page({
|
|||||||
```js
|
```js
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
currentDate: new Date(),
|
currentDate: new Date().getTime(),
|
||||||
minDate: new Date()
|
minDate: new Date().getTime()
|
||||||
},
|
},
|
||||||
onChange(event) {
|
onChange(event) {
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -79,8 +79,8 @@ Page({
|
|||||||
```js
|
```js
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
currentDate: new Date(),
|
currentDate: new Date().getTime(),
|
||||||
minDate: new Date()
|
minDate: new Date().getTime()
|
||||||
},
|
},
|
||||||
onChange(event) {
|
onChange(event) {
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -122,8 +122,8 @@ Page({
|
|||||||
| 参数 | 说明 | 类型 | 默认值 |
|
| 参数 | 说明 | 类型 | 默认值 |
|
||||||
|------|------|------|------|------|
|
|------|------|------|------|------|
|
||||||
| type | 类型,可选值为 `date` <br> `time` `year-month` | `String` | `datetime` |
|
| type | 类型,可选值为 `date` <br> `time` `year-month` | `String` | `datetime` |
|
||||||
| min-date | 可选的最小时间,精确到分钟 | `Date` | 十年前 |
|
| min-date | 可选的最小时间,精确到分钟 | `Number` | 十年前 |
|
||||||
| max-date | 可选的最大时间,精确到分钟 | `Date` | 十年后 |
|
| max-date | 可选的最大时间,精确到分钟 | `Number` | 十年后 |
|
||||||
| min-hour | 可选的最小小时,针对 time 类型 | `Number` | `0` |
|
| min-hour | 可选的最小小时,针对 time 类型 | `Number` | `0` |
|
||||||
| max-hour | 可选的最大小时,针对 time 类型 | `Number` | `23` |
|
| max-hour | 可选的最大小时,针对 time 类型 | `Number` | `23` |
|
||||||
| min-minute | 可选的最小分钟,针对 time 类型 | `Number` | `0` |
|
| min-minute | 可选的最小分钟,针对 time 类型 | `Number` | `0` |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user