QInput with mask, default value is not display at the first time.
I start to use the mask option on QInput field, but when I set a default value on the model, this value is not displayed in the field.
If I create a second QInput field linked with the same model , without mask, the default value is correctly displayed.
When I focus and change a value in one of the 2 fields, the relation with the model is correct and the 2 fields are updated.
It should be so simple, there would be an additional parameter?
metalsadman last edited by metalsadman
@christian_f see the “warning” https://quasar.dev/vue-components/input#Mask, you’re giving your model a number (should be a string), here https://codepen.io/metalsadman/pen/zVpPVZ?editors=1111.
ok, I saw the warning in the documentation… but I assumed it was the “QInput type”, which can be <Accepted values : text | password | textarea | email | search | tel | file | number | url | time | date>. So I change from “number” to “text” only at this location.
As my model is a numeric value, I added a computed function to cast from number to string, and now all is fine.