Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar: When using timeonly and stepMinute prop together, minute is not showing correctly in the input field #5998

Closed
shubhsaur opened this issue Feb 18, 2024 · 2 comments · Fixed by #6217
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@shubhsaur
Copy link
Contributor

Describe the bug

When we are clicking on the calendar input field and then click on the up or down arrow once for changing hour in the time picker overlay, the minute shown or reflected in the input field and overlay is different and it's also not in the steps of 30 but looks like it is taking the mins from current local time.

Note: By changing only the hour, it is creating the issue, it works fine once we are changing the minutes as well.

Reproducer

https://stackblitz.com/edit/u49nwk?file=src%2FApp.jsx

PrimeReact version

10.5.1

React version

17.x

Language

ES6

Build / Runtime

Create React App (CRA)

Browser(s)

Edge 121

Steps to reproduce the behavior

  1. Go to the reproducer (stackblitz link above) which is basically forked from prime react official documentation.
  2. Click on the input field and then click on the up or down arrow once for changing hour in the time picker overlay.
  3. You can see the minute being reflected in the input field and overlay is different and it's also not in the steps of 30 but looks like it is taking the mins from current local time until or unless you are changing minutes.

Expected behavior

The minutes shown in the input field should be same and in sync with the time picker overlay if we are changing hour only and minutes should be changed according to whatever the stepMinute user has provided, which is 30 in this case.

@shubhsaur shubhsaur added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 18, 2024
@shubhsaur shubhsaur changed the title Calendar: When using timeonly and stepMinute prop together, time is not being reflecting correctly in the input field Calendar: When using timeonly and stepMinute prop together, minute is not showing correctly in the input field Feb 18, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 19, 2024
@shubhsaur
Copy link
Contributor Author

@melloware anyone working on this or can I pick this up?

@melloware
Copy link
Member

Feel free to work on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants