Telerik Forums
Kendo UI for Angular Forum
0 answers
60 views
I am using MaskedTextbox and NumericTextbox for our form but i don't see any template to add prefix and suffix icon as regular kendo textbox, please let me know if they will have their own template 
Huynh
Top achievements
Rank 1
 updated question on 06 Jul 2023
0 answers
74 views

I have a custom control that is wrapping the Kendo MaskedTextBox. The template looks like:

<kendo-maskedtextbox
    [id]="id + '_kendo-maskedtextbox'"
    [ngClass]="{ 'error-style': this.isError }"
    class="default-style"
    [(ngModel)]="value"
    [mask]="textboxMask"
    [rules]="rules"
    [maskValidation]="maskValidation"
    [rules]="rules"
    [fillMode]="fillMode"
    [rounded]="rounded"
    [size]="size"
    [disabled]="disabled"
    [style.width.px]="width"
    [includeLiterals]="includeLiterals? true : false"
    (blur)="onBlur()"
    (focus)="onFocus()"
    (valueChange)="onValueChange($event)">
</kendo-maskedtextbox>

What I have found when I have the includeLiterals input binding my value stored in value gets cleared out, but if I do not have this input present on the masked textbox, the value is left alone and works as expected. This seems like there is a bug in the code for the control, that is causing this. My only work around is to not have that input binding present in my codes template so the rest of my controls work as expected, but I need to have the includeLiterals so that I can have the literals part of the value when it is updated by the user.

To reproduce, create an component that wraps the masked textbox input, ensure that component implements the ControlValueAccessor interface and has a provided defined for it. Then on another page use that component and pass in the value you want for it via ngModel.

I have tried this with out the control being wrapped in the other control and it works without any issue, but I need it wrapped to provide a uniform experience for the rest of my application and reduce any duplicated code.

Don
Top achievements
Rank 1
 asked on 06 Jun 2023
0 answers
40 views

I'm trying to check if there are any changes in a form so that I can warn the user of changes, but when setting the model and binding a null value to the MaskedTextbox it changes it to an empty string and the user gets the message that something has changed. Is there a way to prevent the MaskedTextbox from doing that?

 

Pablo
Top achievements
Rank 1
 asked on 11 Mar 2023
1 answer
257 views

Hi, we are looking for the input, dropdowns which has this outline design in the material theme but we are not able to find it. 

 

It'd have been better if we have this.

 

something like this https://codepen.io/finnhvman/pen/xyOORQ

 

Thanks.

1 answer
52 views

I have an Angular Reactive form with a kendo grid. When I double click a record in the grid I have a kendo window popping up to allow the user to edit the details of the selected record. I am able correctly  load the values of some of the other controls like the textbox and dropdown lists, but the masked textbox value does not want to display. I'n not sure what I'm doing wrong. Here is my html markup and component code. If I use interpolation then its showing me the value in the div. As you can see in the screenshot

                  <div class="col">
                    <kendo-formfield>
                      <kendo-label [for]="Mobile" text="Mobile"></kendo-label>
                      <kendo-maskedtextbox
                      formControlName="Mobile"
                      #Mobile
                      [includeLiterals]="false"
                      [(value)]="mobileValue"
                      [maskOnFocus]="true"
                      [mask]="telephoneMask"
                    ></kendo-maskedtextbox>                      
                    </kendo-formfield>        
                 

</div>

 

   
Martin
Telerik team
 answered on 23 May 2022
1 answer
76 views

Hi,

 

Could i make all validation like Mask only in HTML File ?

Like this ?


@Component({
selector: "my-app11b",
template: `
<form #templateForm11b="ngForm" novalidate>
<p>Enter valid postcode (A9 9AA)</p>
<kendo-maskedtextbox
name="value1"
[(ngModel)]="value10b"
[mask]="A9 9AA"
[maskValidation]="true"
></kendo-maskedtextbox>
<button [disabled]="!templateForm11b.valid" type="submit" class="k-button">
Submit
</button>
</form>
`,
})
export class AppComponent11b {
public value10b = "M1 1AE"; //only data
}

 

Regards

 

Martin
Telerik team
 answered on 23 Jun 2021
1 answer
175 views

Hi,

 

I search an elegant way for connecting together mask field and control of this field only in typescript.

Do you have an template ?

I want avoid two separate datas for same field

 

Regards

 

 

Martin
Telerik team
 answered on 23 Jun 2021
1 answer
225 views

 

Hi,

The MaskedTextBox is missing some features of a regular TextBox:

  • adornments 
  • validation icons
  • clearButton / clearButtonIcon
  • placeholder
  • selectOnFocus
  • required validation

I think it would be logical if a MaskedTextBox should be a TextBox with mask functionality.  All input controls should be as consistent as possible.

 

Actually, the same question applies to the following input controls: 

  • kendo-numerictextbox
  • kendo-autocomplete
  • kendo-combobox
  • kendo-dropdownlist
  • kendo-multiselect
  • kendo-textarea

 

Could this be improved please?

Svet
Telerik team
 answered on 16 Oct 2020
4 answers
49 views

Sample code:

<kendo-maskedtextbox  id="txteef610884cad733d72d8"  name="txteef610884cad733d72d8"  mask="(0000)-(00000)"  (change)="update($event)"                     [(ngModel)]="contact"  #txteef610884cad733d72d8="ngModel"></kendo-maskedtextbox>

 

Sushant
Top achievements
Rank 1
Veteran
 answered on 24 Sep 2020
1 answer
1.0K+ views

I want to add a Placeholder to my MaskedTextBox. But adding the placeholder attribute does not work.

I even set maskOnFocus to true so that placeholder will be shown but to no avail.

<kendo-maskedtextbox [maskOnFocus]="true" [mask]="mask" [value]="value" placeholder="Phone Number"></kendo-maskedtextbox>

 

Is there a way for me to achieve this in the current version?

And are there plans to support placeholder in MaskedTextBox in the near future?

Hetali
Telerik team
 answered on 16 Jan 2020
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?