jQWidgets Forums

jQuery UI Widgets Forums Grid Globalization/Localization issue

This topic contains 2 replies, has 2 voices, and was last updated by  Peppino 10 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Globalization/Localization issue #57820

    Peppino
    Participant

    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.htm

    Regards,
    Peppino

    Globalization/Localization issue #57821

    Dimitar
    Participant

    Hello 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,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Globalization/Localization issue #57840

    Peppino
    Participant

    Hi Dimitar,

    It works smooth!

    Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.