选择完整时间

    1. v-model="currentDate"
    2. type="datetime"
    3. :min-date="minDate"
    4. :max-date="maxDate"
    5. />
    1. export default {
    2. return {
    3. minHour: 10,
    4. maxHour: 20,
    5. minDate: new Date(),
    6. maxDate: new Date(2019, 10, 1),
    7. currentDate: new Date()
    8. };
    9. }
    10. };

    选择日期(年月日)

    1. export default {
    2. data() {
    3. return {
    4. currentDate: new Date()
    5. };
    6. }

    选择日期(年月)

    1. v-model="currentDate"
    2. type="year-month"
    3. :min-date="minDate"
    4. />

    选择时间

    1. <van-datetime-picker
    2. v-model="currentDate"
    3. type="time"
    4. :min-hour="minHour"
    5. :max-hour="maxHour"
    6. />
    1. export default {
    2. data() {
    3. return {
    4. currentDate: '12:00'
    5. };
    6. }