Skip to content

stuck with cursor on / text of date with datetime extension #2464

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

Open
julienGrd opened this issue Feb 9, 2021 · 11 comments
Open

stuck with cursor on / text of date with datetime extension #2464

julienGrd opened this issue Feb 9, 2021 · 11 comments

Comments

@julienGrd
Copy link

Hello guys, i use this library to format a time component (HH:MM), it works well, except it seem possible to select the : and to continue typing the user have to tap : on his keyboard, which is not convenient

you can reproduce this on the demo page https://robinherbots.github.io/Inputmask/ (actually i use the same version of this site because with the npm version im not able to include the datetime extension, i have a js module error)

  • you write a date
  • still with the focus on the date, you use the left arrow to navigate until a slash character is selected
  • until on this slash, you have to write the slash to move forward

actually the "selection" behavior of the datetime extension is not the same than than classics mask (where you can't select character)

thanks for your help

PS : I use Chrome 89 beta

@adlerdias
Copy link
Contributor

If you remove the positionCaretOnClick, then you can select any value to update.

https://jsfiddle.net/adlersd/hno7L5j6/

@julienGrd
Copy link
Author

If you remove the positionCaretOnClick, then you can select any value to update.

https://jsfiddle.net/adlersd/hno7L5j6/

Thanks for your help. Your jsfiddle have the same problem that i describe. if you move curosr with leftarrow, you can be stuck in the :
I try to play with positionCaretOnClick option, i dont find good documentation, i try put value none, radixFocus, lvp, it seem have no effect.

@invisiblepredator
Copy link

I have the same problem, does anybody already knows how to deal with it?

@julienGrd
Copy link
Author

@invisiblepredator im still stuck with it. If you find a way to correct it let me know

@RobinHerbots
Copy link
Owner

RobinHerbots commented Feb 23, 2021

@julienGrd ,

I fixed the issue.
Have a try with version 5.0.6-beta.38

@julienGrd
Copy link
Author

Hello @RobinHerbots thanks for take care about this issue.
it seem i stil have the problem, you can still reproduct on your demo page on the date control (i checked the Version its 5.0.6-beta.38).

thanks !

@RobinHerbots
Copy link
Owner

@julienGrd ,

Are you sure? So you take the datetime dd/mm/yyyy
Type 23
tap left to set the caret on the /
type 3
and you get 23/03/yyyy

@julienGrd
Copy link
Author

It kind of works but not perfectly :

  • it not works between month and year
  • if you have an entire date and back to the / between day and month
    -- for example 22/05/2017, put the cursor on the / between 22 and 05 and tap 1 => 20/02/2017, we don't understand why

can we have a system where the cursor automatically "jump" over the / and : ? (when we write and when we came back)

thanks !

@julienGrd
Copy link
Author

also, can you put the time in your demo ?

alias: "datetime",
inputFormat: "HH:MM"

@MaximBalaganskiy
Copy link

MaximBalaganskiy commented Mar 2, 2021

It may also be related... When the value is set via setValue or directly on an input the cursor stops skipping "/" separators. It does skip correctly though in an empty input or with an input which has not been set outside of the plugin.

@mihsar
Copy link

mihsar commented Jun 9, 2021

Hi,
I managed to replicate a related problem here: https://jsfiddle.net/k0ofmbqd/2/

The problem occurs when input already has a value '2020-12-31' then, the inputmask behave a bit different and get stuck on separator '-', check the js fiddle for example and also un-comment the quick fix (it's resetting value on input mask on page load, maybe this could be done in the plugin automatically?!).

Thanks and regards!

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

No branches or pull requests

6 participants