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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid locale not applied to datepicker control column?

Thread ID:

Created:

Updated:

Platform:

Replies:

146121 Jul 21,2019 02:06 PM UTC Jul 26,2019 06:02 AM UTC ASP.NET Core - EJ 2 5
loading
Tags: DataGrid
Bernard Jurlina
Asked On July 21, 2019 02:06 PM UTC

I set my grid to hr-HR locale but when open datepicker control in the editor, there is not hr-HR locale for it.





How to set the locale for the grid datepicker edit control?

Thanks!
Bernard.

Thavasianand Sankaranarayanan [Syncfusion]
Replied On July 22, 2019 07:25 AM UTC

Hi Bernard, 

Thanks for contacting Syncfusion support. 

we have validated your requirement. You can set the locale for the datepicker  control by using the editParams. 
Please find the below code snippet and documentation link for more information. 


@{ 
    var editParams = new { @params = new { locale = "hr-HR" } }; 
                <e-grid-column field="OrderDate" headerText="Order Date" editType="datepickeredit" edit=editParams format="yMd" width="170"></e-grid-column> 


                             https://ej2.syncfusion.com/documentation/api/datepicker#locale 

Please get back to us, if you need further assistance. 

Regards, 
Thavasianand S. 


Bernard Jurlina
Replied On July 22, 2019 06:15 PM UTC

Hi S,

and thanks for the answer. This is what I have in my _Layout.cshtml file



and when I put the editParams like you said



I get this error:


Thanks!
B.

Pavithra Subramaniyam [Syncfusion]
Replied On July 24, 2019 01:20 PM UTC

Hi Bernard, 

Thanks for your update and sharing the details. 

We could see that you have already applied locale using setCulture. So you do not need to use the previous update(include the locale property for the datepicker through edit Params). You just need to include the timeZonesNames.json into the files as in the below code snippet to resolve the issue. 

 

Please get back to us, if you need further assistance. 
 
Regards, 
Pavithra S. 


Bernard Jurlina
Replied On July 25, 2019 05:14 PM UTC

Hi Pavithra,

yes, thank you. Everything is working fine now.

Regards,
Bernard.

Thavasianand Sankaranarayanan [Syncfusion]
Replied On July 26, 2019 06:02 AM UTC

Hi Bernard, 
 
Thanks for your update. 
 
We are happy that the problem has been resolved at your end. 
 
Regards, 
Thavasianand S.  


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

Live Chat Icon For mobile
Live Chat Icon