didi / cube-ui

:large_orange_diamond: A fantastic mobile ui lib implement by Vue
https://didi.github.io/cube-ui/
Apache License 2.0
9.14k stars 1.47k forks source link

datepicker default min max time have problem #760

Closed AdamYLK closed 3 years ago

AdamYLK commented 3 years ago

Version

1.12.38

Reproduction link

http://no.need.code.to.show

Steps to reproduce

default use $createDatePicker to create a picker

What is expected?

the min and max choose time is depends on the real time, no a const value. like new Date() to give the time.

What is actually happening?

the default min and max time has passed

Dependencies Version

vue: 2.6.11 better-scroll: 2.2.1

QiuShuiBai commented 3 years ago

@AdamYLK This is not a bug. But you can customize min and max as needed.

As example:

min: [new date().getFullYear() - 4, 1, 1, 0, 0, 0]