Skip to content

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

@Agular

Description

@Agular

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions