Closed ursfan closed 1 year ago
Can you not just post a link to your Code Sandbox project showing the issue?
I'm sorry, but I don't own an account for codesandbox.io to link an own example to that opened issue. I used a public sandbox for that. Thank you for your willingness to help with that problem anyway. Maybe the image helps to see the issue. For the first field I can only edit the part after the year 2021 and for the second I also can edit the 9 of 2019, which isn't wished for my use case.
you dont need an account you can just paste the link from your URL to your example here.
I just updated your sandbox to 8.6.1 and I am not seeing any issues: https://codesandbox.io/s/headless-sun-v8e2mb
Or maybe I don't understand the issue you are having?
thank you for your hint. I've tried it, but unfortunately, the problem still remains as described before. In the second input field, when you use the backspace key you can delete all allowed input characters including the number "9" of the intended fixed part "2019" of the input mask, although this isn't wished. For a solution of this issue the number "9" shouldn't be deletable, as all the other numbers between 0-8 of the mask. The number "9" is used a a special character for the input field so it can't be used as intended in a pattern to stay fixed.
Issue tracker is used for defects only as part of our commitment to quality and continuous improvement in all areas. Enhancements are collected as valuable community feedback and managed internally so moving this enhancement ticket to our internal project management backlog.
I still have the same issue, this is a bug, not an enhancement
Codesandbox Case (Bug Reports) https://codesandbox.io/s/sleepy-blackwell-zx1v3?file=/src/App.js
Current behavior: Any number can be used as fixed part of the mask for MaskedInput, but not number "9". In my case I have a fixed part which contains a date (year number), which is part of an identifier which should be fixed partially, but can be completed by the user to filter the rows of a table. At the moment I can use for example the year 2021 as fixed part of a mask, but not 2019. In the second case the user can change the last number of 2019 to lets say 2011, which shouldn't be allowed and doesn't happen for the mask "2021". I wish to have the possibility to escape the number "9" to use it as number and not as a placeholder for the pattern [0-9] of the mask. the same applies to "a" or "*".
Expected behavior: If I escape the number "9" in the given mask it should be handled as any other number for example the numbers 1, 2 .... Another solution could be that the placeholder for the pattern "[0-9]" isn't the number "9", but something other as "b" or anything else.
React version: 17.0.2
PrimeReact version: 6.6 - 7.2