Unplanned
Last Updated: 05 Sep 2025 06:50 by ADMIN

Currently, when a MaskedTextBox is emptied while the includeLiterals property is set to true, the control returns a string that still contains the literals defined by the mask. This behavior makes it difficult to distinguish between a genuinely empty input and one that contains only literals.

Expected behavior:
When the user clears the input, the MaskedTextBox should return either an empty string ("") or null, even if includeLiterals = true.

Suggested improvement:
Introduce an option on the MaskedTextBox that lets developers choose the desired behavior when clearing:
Keep literals (current behavior),
or Return empty string / null (proposed behavior).

Why this matters:
It complicates validation and data processing, as developers need to add extra logic to detect and strip literals.
In many real-world scenarios, an empty field should semantically represent no input, not a string with placeholder characters.
Making this configurable would give developers flexibility without breaking existing behavior.

Reproducible example:
I’ve created a working example in StackBlitz that demonstrates the issue.

Unplanned
Last Updated: 13 Aug 2021 13:05 by ADMIN
Created by: Alan
Comments: 0
Category: MaskedTextBox
Type: Feature Request
17
MaskedTextBox, there is no support "placeholder" text in the control prior to user input. It would be nice if, instead of showing the mask, it could show placeholder text like native HTML input box does until you begin typing then it would show the mask prompts. Full support for styling the placeholder text using the ::placeholder pseudo class would also be required.

https://www.telerik.com/kendo-angular-ui/components/inputs/maskedtextbox/