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

Move the caret to the next block if separator is pressed #941

Closed
REDECODE opened this issue Sep 6, 2023 · 2 comments
Closed

Move the caret to the next block if separator is pressed #941

REDECODE opened this issue Sep 6, 2023 · 2 comments

Comments

@REDECODE
Copy link

REDECODE commented Sep 6, 2023

What problem you are trying to solve?
Move the caret automatically when separator is pressed

Describe the solution you'd like
Consider the time in the format HH:MM
Currently it works if you digit for example 0215 in this sequence (resulting in 02:15), because IMask add the : in the middle correctly, but it can be very useful if you can have the same result if you digit 2:15. If you do this right now the result will become 21:5 and its not correct. Basically pressing the separator should move the caret position after the next separator, in this case from hours to minutes.

Its something useful for others? There is another solution? Thanks to all

@uNmAnNeR
Copy link
Owner

from v7.5.0 autofix can be used with pattern mask. Solution to the initial issue:

{
  mask: 'HH:MM',
  autofix: 'pad',
  // ... blocks and other options
}

@REDECODE
Copy link
Author

Wow thanks it works!

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

No branches or pull requests

2 participants