You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thanks for this package, it's really great!
I love the UX of <NumberFormat allowEmptyFormatting format="+1 (###) ###-####" _mask="_" type="tel" />. However, I've noticed that when using format, it then restricts the length of the input.
I would love to allow users to optionally provide phone extensions. For example, this is a valid phone number according to libphonenumber-js: +1 (414) 444-1919 #123456789 (# or ,). Is there an easy way with NumberFormat ? Either by allowing to go beyond the length of the provided format and leave it unformatted, or providing an optional format at the end? I've tried with isAllowed but it seems like it does not go hand-in-hand with format 😕
I've made a quick attempt at specifying my custom format, but must have done something wrong because the placeholder I return from the formatting can be erased.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
First of all thanks for this package, it's really great!
I love the UX of
<NumberFormat allowEmptyFormatting format="+1 (###) ###-####" _mask="_" type="tel" />
. However, I've noticed that when using format, it then restricts the length of the input.I would love to allow users to optionally provide phone extensions. For example, this is a valid phone number according to
libphonenumber-js
:+1 (414) 444-1919 #123456789
(#
or,
). Is there an easy way withNumberFormat
? Either by allowing to go beyond the length of the provided format and leave it unformatted, or providing an optional format at the end? I've tried withisAllowed
but it seems like it does not go hand-in-hand withformat
😕I've made a quick attempt at specifying my custom format, but must have done something wrong because the placeholder I return from the formatting can be erased.
Thanks so much for your help!
Beta Was this translation helpful? Give feedback.
All reactions