Skip to content

When using min and max in same year, the year portion is truncated and keyboard entry blocked #1139

Description

@bobleap

Describe the bug
When using the Date mask, setting a min and max within the same year causes problems with keyboard entry of dates.

  • If you have provided an initial value and autofix=false then it shows the value, but it positions the cursor at the beginning of the year portion as if to fix it.
  • If autofix=true, it removes the year entirely.
  • Trying to change or enter a year (type the number 2) is ignored.

To Reproduce
jsfiddle
Toggle the autofix true/false to see the different output.

Expected behavior
It should support min and max within the same year.

Environment:

  • OS: Windows
  • Browser: Chrome
  • Version: 143
  • IMask version: 7.6.1
  • Framework/plugin version: angular-imask@7.6.1

Additional context
If you set the parse() prop, you'll notice that the value is already truncated when handed off as an argument.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions