lanjingling0510 / react-mobile-datepicker

🙊 👻 look a demo, Please imitate mobile environment.
https://codepen.io/lanjingling0510/pen/LRpOYp?editors=1010
MIT License
301 stars 145 forks source link

无法选择低于时间戳起始年(1970)的日期 #36

Closed youyeke closed 5 years ago

youyeke commented 5 years ago

javascript 可通过负数来表明低于 1970 年的日期,如:

const time = new Date(- 10 * 9999999999);
-> Mon Oct 31 1966 22:13:20 GMT+0800 (中国标准时间)
time.getFullYear();
-> 1966

但该时间控件无法识别

youyeke commented 5 years ago

可通过 min 配置解决

<DatePicker
  min={new Date('1940')}
/>