maskedtextbox configuration

Hello,
I use maskedtextbox but when the configuration of my mask contains the characters (0,a,Ac) its is not displayed.
My code:

HTML:
 <ejs-maskedtextbox   formControlName="compte"  (focus)"onfocus($event)" mask={{limiteCaratereCompte}} >
                </ejs-maskedtextbox>

TS:
 this.limiteCaratereCompte='';
    for(let i =1;i<=nbre;i++){
     
      //this.limiteCaratereCompte+= "A"; concat('a')
      this.limiteCaratereCompte = this.limiteCaratereCompte.concat('&');
    }

    this.limiteCaratereCompte = "\\".concat(this.limiteCaratereCompte);


3 Replies

PM Ponmani Murugaiyan Syncfusion Team March 3, 2020 10:22 AM UTC

Hi Bassaramani, 

Greetings from Syncfusion support. 

We have checked you reported issue. But, unfortunately, we couldn’t get your exact scenario. 

Please provide the below details to provide the solution for your issue at the earliest. 

1.Whether you have rendered masked textbox in dialog template of Grid component? 
2.In which event, you have made the configuration for mask? 
3.What is the mask character you are trying to display, because initially you have given (0,a,Ac), but in the image highlighted ‘AAAA’. 
4.Whether you are trying to fetch the mask character from the grid? 
5.Whether you need to concat the mask character with ‘&’? 

If possible, please provide the code snippet with more information or video demonstration or sample to check your reported issue further. 

Regards, 
Ponmani M 



BA bassaramani replied to Ponmani Murugaiyan March 3, 2020 11:54 AM UTC

Hi Bassaramani, 

Greetings from Syncfusion support. 

We have checked you reported issue. But, unfortunately, we couldn’t get your exact scenario. 

Please provide the below details to provide the solution for your issue at the earliest. 

1.Whether you have rendered masked textbox in dialog template of Grid component? 
2.In which event, you have made the configuration for mask? 
3.What is the mask character you are trying to display, because initially you have given (0,a,Ac), but in the image highlighted ‘AAAA’. 
4.Whether you are trying to fetch the mask character from the grid? 
5.Whether you need to concat the mask character with ‘&’? 

If possible, please provide the code snippet with more information or video demonstration or sample to check your reported issue further. 

Regards, 
Ponmani M 


hi Ponmani  ,
this is my code source ans screenshot :

HMTL:
  <ejs-maskedtextbox   mask={{limiteCaratereCompte}}
  ></ejs-maskedtextbox>

TS:

import { ComponentOnInit } from '@angular/core';

@Component({
  selector: 'app-test',
  templateUrl: './test.component.html',
  styleUrls: ['./test.component.scss'],
})
export class TestComponent implements OnInit {

  public limiteCaratereCompte:string="AAA";

  constructor(){}
  
  public ngOnInit(): void {

    for(let i =1;i<5;i++){
      this.limiteCaratereCompte = this.limiteCaratereCompte.concat('&');
    }
    console.log(this.limiteCaratereCompte)
    this.limiteCaratereCompte = "\\\\".concat(this.limiteCaratereCompte);
    console.log(this.limiteCaratereCompte)
   }
}



PM Ponmani Murugaiyan Syncfusion Team March 4, 2020 12:11 PM UTC

Hi Bassaramani, 

We have validated your reported issue. We would like to inform you that, “\\” is the escape sequence, the character next to \\ will be displayed in the mask. 

For example, If you want a mask element to appear as a static element you can escape them by \\. 

We have prepared stackblitz sample for you reference, which contains the \\ in front and mid of the mask character and the output is the character next to double escaping will be shown in mask. 

Input:  

Mask: \\AAA&\\&&& 

Output

 


By default, this is the behavior. So we suggest you to modify your sample as per this. 

Please let us know, if you have any concerns on this. 

Regards, 
Ponmani M 


Loader.
Up arrow icon