ant-design / ant-design-mobile-rn

Ant Design for React Native
https://rn.mobile.ant.design/
MIT License
3.02k stars 609 forks source link

Missing hour when setting min and max date on DatePickerView and using use12Hours #1224

Closed rafavalerio closed 1 year ago

rafavalerio commented 2 years ago

Reproduction link

https://codepen.io/rafavalerio/pen/ZEvKeyg

Steps to reproduce

Set the minDate to a time before 12PM. Set the maxDate to a time after 12PM. Set the option use12Hours to true.

What is expected?

Should be able to correctly see the hours displayed on the date picker.

What is actually happening?

The hour selector is completely missing and won't allow the user to set the hour.

Environment Info
antd 4.2.0
React "react": "17.0.1", "react-native": "0.64.2"
System iOS
Browser Native app

It seems the issue is related to the use12Hours option. Removing that will allow the user to correctly choose the hour in the 24hr format. When using the use12Hours it won't.