Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cannot enter the fourth zero with mask '#:0:0:###' #17980

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
doox911 opened this issue Apr 22, 2025 · 7 comments
Open

Cannot enter the fourth zero with mask '#:0:0:###' #17980

doox911 opened this issue Apr 22, 2025 · 7 comments
Labels
bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 mode/spa Qv2 πŸ” Quasar v2 issues

Comments

@doox911
Copy link

doox911 commented Apr 22, 2025

What happened?

The fourth zero disappears

What did you expect to happen?

0:0:0:0 in the q-input as a value

Reproduction URL

https://codepen.io/doox911/pen/PwwzGgr?editors=101

How to reproduce?

  1. Enter zero
  2. Enter zero

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

SPA Mode

Platforms/Browsers

Other

Quasar info output

Relevant log output

Additional context

No response

@github-actions github-actions bot added bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite mode/spa labels Apr 22, 2025
@FragsterAt
Copy link

Problem is more complex. The reason is the suppression of input characters from mask. With mask="1###" you can't enter number with 1

@stefanvanherwijnen
Copy link
Contributor

Numbers are not supported tokens in the mask: https://quasar.dev/vue-components/input#mask .

You probably want to have some regex based manual validation.

@doox911
Copy link
Author

doox911 commented May 6, 2025

Numbers are not supported tokens in the mask: https://quasar.dev/vue-components/input#mask .

You probably want to have some regex based manual validation.

The documentation specifically states that it is supported. The '#' symbol is used.

https://github.com/quasarframework/quasar/blob/dev/ui/src/components/input/use-mask.js#L6

@stefanvanherwijnen
Copy link
Contributor

Numbers are not supported tokens in the mask: https://quasar.dev/vue-components/input#mask .
You probably want to have some regex based manual validation.

The documentation specifically states that it is supported. The '#' symbol is used.

https://github.com/quasarframework/quasar/blob/dev/ui/src/components/input/use-mask.js#L6

I mean numbers like '0', '1', '2' etc. ### works fine, 1## does not.

@doox911
Copy link
Author

doox911 commented May 6, 2025

Numbers are not supported tokens in the mask: https://quasar.dev/vue-components/input#mask .
You probably want to have some regex based manual validation.

The documentation specifically states that it is supported. The '#' symbol is used.
https://github.com/quasarframework/quasar/blob/dev/ui/src/components/input/use-mask.js#L6

I mean numbers like '0', '1', '2' etc. ### works fine, 1## does not.

I don't quite understand you. In my case, it's not 1##, but rather 1:##. Could you please elaborate in more detail on what you mean?

@stefanvanherwijnen
Copy link
Contributor

It does work a little different than I thought. You can only use the input with the supported mask tokens

With 1:## you can only enter two numeric characters. With 1:0:0:0 you can't enter anything as there are no mask tokens.

@doox911
Copy link
Author

doox911 commented May 6, 2025

It does work a little different than I thought. You can only use the input with the supported mask tokens

With 1:## you can only enter two numeric characters. With 1:0:0:0 you can't enter anything as there are no mask tokens.

Well, that's clear enough! My problem is that with the mask 0:#, I can't input 0 in place of the # symbol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 mode/spa Qv2 πŸ” Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

3 participants