RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.39k stars 2.17k forks source link

Placeholder weird behavior #2797

Closed stsrki closed 3 months ago

stsrki commented 3 months ago

We got this report from one of our users: https://github.com/Megabit/Blazorise/issues/5560

I'm not sure if this is the correct behavior. I would assume that the placeholder would behave the same as for regular input, i.e., show a hint until the user starts to write value. But in this case, the placeholder becomes a part of the value.

Can you please clarify?

RobinHerbots commented 3 months ago

The behavior is correct. The placeholder is to pass a placeholder for the mask and not to be confused with the placeholder of the input. passing "" will fill the unfilled characters with "" (mask 99-99-99 => __-__-__), when passing a placeholder like "abcd" this wil be used to fill the unfilled characters. mask 99-99-99 => ab-cd-ab

See https://robinherbots.github.io/Inputmask/#/documentation#placeholder-1

stsrki commented 3 months ago

Thanks for the clarification. It helps us to plan for the next steps.