Selecting an AM will redirect the datepicker view to a PM for 24h timeMode.
See original GitHub issueI am using create-react-app as my development template. It has json-loader and i’ve imported everything as per the guide. onTimeChange, it calls a function to set the time to the state, which then feeds back into the TimePicker to via the time prop to update the view.
handleTimeChange(time) {
console.log(time)
this.setState({ time });
}
render() {
const { time } = this.state;
return (
<div className="form-group">
<TimePicker
theme="classic"
time={time}
timeMode="24"
onTimeChange={this.handleTimeChange.bind(this)} />
</div>
);
}
The problem comes in when I select the time, such as 1:00. I’ve logged what i get back from the onTimeChange method to compare the results between the view and the console.
and here is me selecting 13:00
both examples change the date picker time to 13:00, i’m just confused as to why it does it on the first one?
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
24 time in portal date picker - change to am/pm - ServiceNow
I have a date/time picker on one of my catalogue items. It's formatted in 24 hour when the user clicks the clock to...
Read more >How to change material-ui timepicker to 24 hour format
I have it set to type="time" which allows me to select through times during the day in 12 hours with a AM /...
Read more >Datepicker am/pm error for 24h time format #5004 - GitHub
When call datepicker i want to see hours range from 00 to 23 (when i have 24h format in settings). Actual behavior: [What...
Read more >DatePicker AM/PM - Power Platform Community - Microsoft
Solved: Is there a way to change the DatePicker to support 12 hour AM/PM? ... Is it possible to choose AM/PM in a...
Read more >Advanced Datepicker - Ninja Forms
Documentation on how to use Advanced Datepicker for Ninja Forms. Add customized date/time form fields for scheduling and appointment form options directly ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry to reply you late. I had some personal trivia to deal some days ago, and now I’m coming back to fix this issue. First thank you so much for your enthusiasm to help me find these bugs. It’s my fault that now find these problems, and now I make some changes for this module:
Now I have made a new version 2.2.8 to publish these changes. Would you like to update your dependency and check again? Thanks!
So strange. It worked well for me so I can’t reappearance this bug. But by looking your gif, it really looks like the bug which happened before v2.2.7. Can you reinstall this package, or clean browser cache? Cause it’s only a little change from v2.2.6 to v2.2.7, and maybe node module system or browser cached the required file. It’s only a guess, and I’m still debugging to check if any other bug exist.