Does not respect the hour limits when pressing the AM/PM selector
- Dominant language
- JavaScript
- Stars
- 2k
- Forks
- 858
- PR merge metrics
- No merged PRs in 30d
Description
### I'm Submitting a ...
```
[x] Bug report
[ ] Feature request
[ ] Support request
```
### Steps to Reproduce
1- Create an instance of react-datetime with the time format as "hh:mm A" and the min and max hours as 8 and 18 respectively
2 - Run the project
3 - Change the hour selecting by pressing only the upwards arrow in the 'AM/PM' selector
4 - The hour limits are not respected
### Expected Results
It should respect the hour limits when changing through the AM/PM selector
### Actual Results
### Minimal Reproduction of the Problem
Here is the codepen
https://codepen.io/Damianed/pen/eYYypaR
The hour should no got pass 6 PM and it works fine when pressing the hour arrows but it doesn't when presssing the AM/PM arrows
Contributor guide
Research direction
Reproduce the issue using the linked CodePen with the "hh:mm A" format and hour limits of 8 and 18. Trace the hour and AM/PM selector behavior, then verify that changing AM/PM never moves the selected time past 6 PM while the existing hour arrows continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100