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. Image for the cookie policy date

Localization for DatePicker is not working properly

Hello,

I'm trying to set localization for ejDatePicker and ejDateTimePicker but it seams that it doesn't work, not sure why.

Code is attached and set sample in playground: Sample (http://jsplayground.syncfusion.com/0sirg3zb)

In sample you will se DatePicker, DateTimePicker, Autocomplete and ColorPicker. Both Autocomplete and ColorPicker are working fine with localization, but DatePicker and DateTimePicker are not.

In syncfusion samples i can see that labels are set manually for date picker, but I don't wont to do that, it should be working automatically like for ColorPicker and Autocomplete.

Not sure if I'm missing something or there is a bug in control.




Attachment: EssentialStudioforJavaScriptDatePickerlocalization_f39c8abd.zip

4 Replies

SA Shameer Ali Baig Sulaiman Ali Baig Syncfusion Team January 2, 2017 01:00 PM UTC

Hi Nebojsa Zecevic, 
                                     
Thanks for contacting Syncfusion support. 
 
Query 1: 
 
We have analyzed your query and checked your sample. We suspect that the issue may be caused due to the incorrect reference links used in your code sample. We have modified those reference links in your sample to meet your expectation to set localization for DatePicker and DateTimePicker. 
 
For your convenience, we have attached the sample in the JS Playground link 
 
Query 2: 
 
Can you please let us know about what did you mentioned as ‘labels’ in your query? It will help us to clearly figure out your query and give you support.  
 
To know about EJ Globalize support, Please the following link 
 
Please revert us, if you have any further queries. 
 
Regards, 
Shameer Ali Baig S 
 



NZ Nebojsa Zecevic January 4, 2017 08:09 AM UTC

Hi Shameer Ali Baig Sulaiman Ali Baig,

Thanks for your answer.

Question 1:
What was the problem with links i used? Older version or there is a bug in that version?

Question 2:
By labels i was referring on button text that should be localized, in some of your samples for JavaScript translated labels are set manually in code. Check this link http://js.syncfusion.com/demos/web/#!/bootstrap/datetimepicker/localization
You will see something like this:
var texts = {};
var placeholder;
...
else if (args.value == "vi-VN") {
  texts = { today: "hôm nay", timeNow: "Bây giờ là", done: "được rồi", timeTitle: "thời gian" };
  placeholder = "Chọn ngày giờ";
}
...
dateTimeobject.setModel({ "locale": args.value, buttonText: texts, watermarkText: placeholder });

Kind Regards,
Nebojsa Zecevic


NZ Nebojsa Zecevic January 4, 2017 08:42 AM UTC

Hi Shameer Ali Baig Sulaiman Ali Baig,

I got it working in my application. It was link problem after all.

Thanks for your support!

All best,
Nebojsa Zecevic


SA Shameer Ali Baig Sulaiman Ali Baig Syncfusion Team January 5, 2017 05:02 AM UTC

Hi Nebojsa, 
 
Thanks for your update. 
 
Please, let us know if you need further assistance. 
 
Regards, 
Shameer Ali Baig S 


Loader.
Live Chat Icon For mobile
Up arrow icon