Time picker does not update properly
Bug:
When the input is changed from e.g. "01/26/2017 :00 PM" to "01/26/2017 1:00 PM", the time picker won't update from 'AM' to 'PM'.
Hi @Shenmin-Z.
Your example doesn't really make sense, what is :00 PM? This example is working. Could you provide a demo so I can see what props and values you are using?

Hi @simeg , thanks for you reply.
:00 PM doesn't make sense. But when it is changed to 2:00PM, it is a valid time and time picker should display as 2:00PM. It looks like an INVALID PREVIOUS state is preventing a VALID CURRENT state from displaying properly.
The example you provided displays the same behavior.
Thanks for the demo, I see the problem now.
I have a similar issue using the component as a time picker only for hours in 12hs format. The value prop is linked to state value={this.state.hour} and I did a lot of tries with several strings, dates and moment objects like "11 pm", "23", new Date(y,m,d,h),new Date().setHours(23), moment(23,'H'), new Date().toString(), etc but the am/pm part wasn't reflecting the state value. I found that by setting the state twice makes it work properly, of course I'm not proud of the solution
this.setState({time: t}, () => {
this.setState({time: t});
});

is there an official fix for this?
Any fix for this issue? Working through forestry.io CMS isn't working, and they are officially aware of this, and have put disclaimers on their documentation page: https://forestry.io/docs/settings/fields/datetime/ The error goes beyond the 24h problem though, even regular AM/PM handling fails, as described in this ticket.