SfMaskedTextbox - Push characters right instead of overwriting

Is it possible to configure an SfMaskedTextbox to insert new typed characters and push existing characters to the right instead of overwriting them?  Consider entering a 16 digit credit card number; you get to the end and realize you missed a digit in the middle.  Ideally, the control would let you place the cursor (which it does) and insert the single missing digit (which it doesn't - it overwrites the next digit).

<SfMaskedTextBox @bind-Value="this.value" Mask="0000-0000-0000-0000" PromptChar="@('*')" />


1 Reply

YA YuvanShankar Arunagiri Syncfusion Team October 22, 2025 06:52 AM UTC

The Syncfusion MaskedTextBox component currently does not support insert-mode editing, where characters typed at the cursor position push existing characters to the right. Instead, it follows a position-based overwritten model, which is typical for masked input controls that enforce a fixed format (e.g., phone numbers, dates).

This behavior is by design, as the component is intended to maintain consistent formatting during user input.

If your use case requires insert-mode behavior, for example, editing a credit card number mid-way you might consider using a standard InputText component instead. This gives you full control over input behavior, including insert-mode editing. However, note that InputText does not include built-in masking, so you would need to implement formatting manually if required.


Loader.
Up arrow icon