选择完整时间
v-model="currentDate"
type="datetime"
:min-date="minDate"
:max-date="maxDate"
/>
export default {
return {
minHour: 10,
maxHour: 20,
minDate: new Date(),
maxDate: new Date(2019, 10, 1),
currentDate: new Date()
};
}
};
选择日期(年月日)
export default {
data() {
return {
currentDate: new Date()
};
}
选择日期(年月)
v-model="currentDate"
type="year-month"
:min-date="minDate"
/>
选择时间
<van-datetime-picker
v-model="currentDate"
type="time"
:min-hour="minHour"
:max-hour="maxHour"
/>
export default {
data() {
return {
currentDate: '12:00'
};
}