Vijay V
Vijay V

Reputation: 13

Kendo UI masked textbox - unable to change default prompt char

I am trying to change the default promptChar for a Kendo MaskedTextBox. I tried with code:

 <div class="box-col" style="width: 300px">
        <h4>Enter a number</h4>
        <input data-role="maskedtextbox"
               data-mask="(999) 000-0000"
               data-promptChar="#"
               data-bind="visible: isVisible,
                          enabled: isEnabled,
                          value: phoneNumber,
                          events: { change: onChange }"
               style="width: 200px">
    </div>

However, the textbox still has '_' as the prompt character. Any idea why this is happening? How do I fix this?

Thanks in advance.

Upvotes: 1

Views: 1244

Answers (1)

Robin Giltner
Robin Giltner

Reputation: 3055

Change data-promptChar="#" to data-prompt-char="#"

See working sample http://jsbin.com/xivede/1/edit?html,js,output

Upvotes: 1

Related Questions