We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

When setting locale, the placeholder is not respecting the placeholder property value

Thread ID:

Created:

Updated:

Platform:

Replies:

143566 Mar 26,2019 11:09 PM UTC Apr 4,2019 01:21 PM UTC JavaScript - EJ 2 1
loading
Tags: DatePicker
Grant
Asked On March 26, 2019 11:09 PM UTC

In the createInput method of the DatePicker, the placeholder property is set from l10n only if no placeholder property is currently set:

if (this.getModuleName() === 'datepicker') {
var l10nLocale = { placeholder: null };
this.globalize = new Internationalization(this.locale);
this.l10n = new L10n('datepicker', l10nLocale, this.locale);
this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
}

If you then subsequently call the global setCulture() method; the onPropertyChanged method of the DatePicker is ignoring the explicitly set placeholder value.

case 'locale':
this.globalize = new Internationalization(this.locale);
this.l10n.setLocale(this.locale);
this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);

This seems like inconsistent handling

Ashokkumar Balasubramanian [Syncfusion]
Replied On April 4, 2019 01:21 PM UTC

Hi Grant, 
 
We have checked with your query and we would like to let you know that our DatePicker component will be rendered based on the place holder value set initially through “placeholder” ‌API. While change the locale at the run time, it will accept the placeholder value set through “L10.load” method. This is the default behavior of the DatePicker component. 
 
If you want the initial time DatePicker behavior for run time, you don’t specify the placeholder value in L10.load method.  
 
Please let us know, if you have any concerns on this. 
 
Regards, 
Ashokkumar b. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;