@@ -28,7 +28,7 @@ The `type` attribute configures the type of the component, and it has three opti
2828 <mt-datetime-picker
2929 ref =" picker"
3030 type =" time"
31- v-model =" pickerValue " >
31+ v-model =" value " >
3232 </mt-datetime-picker >
3333</template >
3434
@@ -47,7 +47,7 @@ You can configure a custom template for slot options. The template should be a s
4747
4848``` html
4949<mt-datetime-picker
50- v-model =" pickerVisible "
50+ v-model =" value "
5151 type =" date"
5252 year-format =" {value} 年"
5353 month-format =" {value} 月"
@@ -59,7 +59,7 @@ When the confirm button is tapped, the `confirm` event triggers with `value` as
5959
6060``` html
6161<mt-datetime-picker
62- v-model =" pickerVisible "
62+ v-model =" value "
6363 type =" time"
6464 @confirm =" handleConfirm" >
6565</mt-datetime-picker >
@@ -68,6 +68,7 @@ When the confirm button is tapped, the `confirm` event triggers with `value` as
6868## API
6969| option | description | type | acceptable values | default |
7070| ------| -------| ---------| -------| --------|
71+ | value | value of the picker | Date / String (for example: 2018-1-1 00:00:00 , 2018/1/1 00:00:00 or 2018.1.1 00:00:00))| | |
7172| type | type of the picker | String | 'datetime', 'date', 'time' | 'datetime' |
7273| cancelText | text of the cancel button | String | | '取消' |
7374| confirmText | text of the confirm button | String | | '确定' |
@@ -84,5 +85,5 @@ When the confirm button is tapped, the `confirm` event triggers with `value` as
8485## Events
8586| event name | description | parameters |
8687| ------| -------| ---------|
87- | confirm | callback when the confirm button is clicked | current value of the picker |
88+ | confirm | callback when the confirm button is clicked | current value of the picker (is type of Date) |
8889| changeVisible | callback when pop open or close | current value of pop visible |
0 commit comments