Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
333
igx-date-picker change placeholder
posted

Hello,

is there any possibility to change the placeholder in an igx-date-picker?

In a german website we have this date picker: 

  <igx-date-picker mode="dropdown" id="iGeburtsdatum" name="geburtsdatum"
                        format="dd.MM.yyyy" locale="de-DE" 
                        mask="dd.MM.yyyy" label="Geburtstag"
                        [(ngModel)]="suchParam.geburtsDatum">
                    </igx-date-picker>
The placeholder is now "dd.MM.yyyy". I want to change this to "tt.mm.jjjj".
Thanks in advance.
Stephan
Parents
  • 1320
    Offline posted
    Hello Stephan,
    After investigating this further, I determined that your requirement could be achieved by accessing the inputDirective of the igxDatePicker and setting the placeholder attribute of the input element to the string, which should be displayed.
    public ngAfterViewInit() {
        this.datePicker.inputDirective.nativeElement.placeholder = "tt.mm.jjjj";
      }
    I have prepared a sample, demonstrating the described behavior. Please test it on your side and let me know if you need any further information regarding this matter.

    Regards,
    Monika Kirkova,
    Infragistics

Reply Children