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

bug: ion-datetime timepicker minute selection is restricted when selecting time with hour less than the max hour #24702

Closed
4 of 6 tasks
Agular opened this issue Feb 3, 2022 · 2 comments
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@Agular
Copy link

Agular commented Feb 3, 2022

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

When setting the maximum DateTime to now, user is unable to select all the minutes when the hour is less than the maximum hour. For examble, the max is set to 19:30, then I am unable to select values between 18:31 - 18:59.

ionDateTimeMaxMinutesBugDemo

Expected Behavior

The same behaviour that was achieved in PR #24476 when min was set. When max is set with hours and minutes, then minutes selection is not restricted when the chosen hour is less than the max hour.``

Steps to Reproduce

<ion-datetime
  max={new Date().toISOString()}
  hourCycle="h23"
  presentation="date-time"
/>

Code Reproduction URL

No response

Ionic Info

No response

Additional Information

This bug existed also when min was set and was fixed
Issue: #24474 , PR #24476

The fix for max was supposed to be implemented in PR #24610 , but was probally forgotten. PR #24476 is referenced in the new behaviour,

@ionitron-bot ionitron-bot bot added the triage label Feb 3, 2022
@sean-perkins sean-perkins self-assigned this Feb 3, 2022
@sean-perkins
Copy link
Contributor

Hello @Agular thanks for reporting this issue!

I am noticing the same issue, the minute time constraint within the max value, is being applied to every hour of the time picker, when it should only apply to the hour of the max value.

I'll capture this as a bug 👍

@ionitron-bot
Copy link

ionitron-bot bot commented Mar 6, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Mar 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

2 participants