Reactive

How To Change Date To German Language or any other Language in the Grid?

Add the below code at the top of your grid,

<#
var event = new Date(post.post_date);
var options = { year: 'numeric', month: 'numeric', day: 'numeric' };
var postDate = event.toLocaleDateString('de-DE', options);
#> 
<span class="reactiveDate">{{postDate}}</span>

now, let see what is happening in the above code the first line,

var event = new Date(post.post_date);

in the above code, we have taken our post-created date into our event variable using the Date function.

2nd line,

var options = { year: 'numeric', month: 'numeric', day: 'numeric' };

in this line you will decide which options you want to show like year, month ,day , week etc

3rd line,

var postDate = event.toLocaleDateString('de-DE', options);

'de-DE' is the option for german localization,

and the final line to show the date in the grid,

<span class="reactiveDate">{{postDate}}</span>

if you want to show the text value of month or week name or want to localize it into other language please follow the below linke

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString