Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular UI mask empty placeholder

I am using angular ui mask directive for a date field and its adding underscores for the placeholder. Is there a way to show nothing on the placeholder?

like image 645
Diego Unanue Avatar asked Jun 03 '26 17:06

Diego Unanue


2 Answers

Regarding that is a plugin issue I found this amazing library called ngMask:

https://github.com/candreoliveira/ngMask

like image 200
Diego Unanue Avatar answered Jun 05 '26 14:06

Diego Unanue


Please try this once.

<div ng-app="myApp">
  <input class="form-control" type="text" ng-model="accountNumber" ui-mask="9999 9999 9999 9999 999"  ui-mask-placeholder-char="space" />
</div>

Using ui-mask-placeholder-char="space" , you can get empty placeholder.

like image 23
Mansi Teharia Avatar answered Jun 05 '26 12:06

Mansi Teharia



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!