jQuery UI Widgets › Forums › Grid › Globalization/Localization issue
Tagged: createfilterwidget, firstDayOfWeek, globalization, grid, jqxdatetimeinput, jqxgrid, localization
This topic contains 2 replies, has 2 voices, and was last updated by Peppino 11 years, 5 months ago.
-
Author
-
Hi,
I have an issue with localization of the calendar in filter row(filtertype: ‘date’) in a grid. I am trying to set firstDay to 1:
I have declared global variable var localizationobj = {};
and then I set localizationobj.firstDay = 1;
I implemented localization this way:$(“#anygrid”).jqxGrid(
{
width: ‘100%’,
autorowheight: true,
scrollmode: ‘logical’,
theme: “metro”,
source: dataAdapter,
sortable: true,
pageable: true,
autoheight: true,
filterable: true,
showfilterrow: true,
altrows: true,
columnsresize: true,
columnsreorder: true,
localization: localizationobj, etc…Also I have tried to do this with a function instead using global variable.
var getLocalization = function(){
var localizationobj = {};
localizationobj.firstDay = 1;
return localizationobj ;
}
and then $(“#anygrid”).jqxGrid(
{
localization: getLocalization(),
});Finally I have tried to set firstDay: 1, directly in globalize.js file. Until now I have no success and the week in the calendar of the filter row still starts with Sunday.
Could someone help me with this issue? What am I missing?
I have followed the following article/demo : http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-localization.htmRegards,
PeppinoHello Peppino,
To achieve this, please set your date column’s createfilterwidget callback function, e.g.:
{ text: 'Ship Date', datafield: 'date', filtertype: 'date', width: 210, cellsalign: 'right', cellsformat: 'd', createfilterwidget: function (column, columnElement, widget) { widget.jqxDateTimeInput({ firstDayOfWeek: 1 }); } },Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi Dimitar,
It works smooth!
Thank you!
-
AuthorPosts
You must be logged in to reply to this topic.