jQWidgets Forums

jQuery UI Widgets Forums Grid Grid calendar filter first day of week.

This topic contains 6 replies, has 4 voices, and was last updated by  Dimitar 9 years ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • Grid calendar filter first day of week. #52872

    fkaratay
    Participant

    Hi,

    i have set a localizationstrings settings for my grid.
    everything change but firstdayofweek doesnt change.
    when i set localizationobj.firstDay = 1; jqxgrid filter still display firstdayofweek is Sunday.

    you can see following image from here;
    http://postimg.org/image/uv6wyq5zr/

    as you see “PA” is sunday and it must display end of week “PT” is firstdayofweek but it does not change.

    i need help.

    regards

    my globalization codes;

     var getLocalization = function () {
            var localizationobj = {};
            localizationobj.pagergotopagestring = "Sayfa:";
            localizationobj.pagershowrowsstring = "Sayfa başı kayıt adedi:";
            localizationobj.pagerrangestring = " Toplam kayıt ";
            localizationobj.pagernextbuttonstring = "ileri";
            localizationobj.pagerpreviousbuttonstring = "geri";
            localizationobj.sortascendingstring = "Büyükten küçüğe sırala";
            localizationobj.sortdescendingstring = "Küçükten büyüğe sırala";
            localizationobj.sortremovestring = "Sıralamayı Sil";
            localizationobj.firstDay = 1;
            localizationobj.percentsymbol = "%";
            localizationobj.currencysymbol = "TL";
            localizationobj.currencysymbolposition = "after";
            localizationobj.decimalseparator = ".";
            localizationobj.thousandsseparator = ",";
            localizationobj.emptydatastring = "Gösterilecek kayıt yok.";
            var days = {
                names: ["Pazar", "Ptesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"]
            };
            localizationobj.days = days;
            var months = {
                names: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık", ""],
                namesAbbr: ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara", ""]
            };
            var patterns = {
                d: "dd.MM.yyyy",
                D: "dddd, d. MMMM yyyy",
                t: "HH:mm",
                T: "HH:mm:ss",
                f: "dddd, d. MMMM yyyy HH:mm",
                F: "dddd, d. MMMM yyyy HH:mm:ss",
                M: "dd MMMM",
                Y: "MMMM yyyy"
            }
            localizationobj.patterns = patterns;
            localizationobj.months = months;
            localizationobj.todaystring = "Bugün";
            localizationobj.clearstring = "Temizle";
            return localizationobj;
        }

    Dimitar
    Participant

    Hello fkaratay,

    Thank you for your feedback. We confirm the issue regarding localizationobj.firstDay. As an alternative, we recommend setting the datetimeinput in the column directly like so:

    $("#jqxgrid").jqxGrid(
    {
        width: 850,
        source: dataAdapter,
        showfilterrow: true,
        filterable: true,
        pageable: true,
        autoheight: true,
        editable: true,
        localization: getLocalization(),
        selectionmode: 'singlecell',
        columns: [
            { text: 'Name', columntype: 'textbox', filtertype: 'textbox', datafield: 'name', width: 180 },
            { text: 'Produkt', filtertype: 'textbox', datafield: 'productname', width: 220 },
            { text: 'Datum', datafield: 'date', columntype: 'datetimeinput', filtertype: 'date', width: 210, cellsalign: 'right', cellsformat: 'd',
                createfilterwidget: function (column, columnElement, widget) {
                    widget.jqxDateTimeInput({ firstDayOfWeek: 1 });
                }
            },
            { text: 'Qt.', datafield: 'quantity', columntype: 'numberinput', filtertype: 'textbox', cellsalign: 'right', width: 60 },
            { text: 'Preis', datafield: 'price', columntype: 'numberinput', filtertype: 'textbox', cellsformat: "c2", cellsalign: 'right' }
        ]
    });

    Now the first day of the week will be Monday.

    Best Regards,
    Dimitar

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

    Grid calendar filter first day of week. #65356

    ettemlevest
    Participant

    Hello Dimitar,

    with the recent 3.6.0 version I also have this same issue. Your suggestion is working fine but have to use it in every date filtered column. Any change of fixing this bug?

    Thanks, best regards,
    Imre

    Grid calendar filter first day of week. #65361

    Dimitar
    Participant

    Hello Imre,

    This is the only solution on the matter. Note that you can apply the same createfilterwidget function to multiple columns, e.g.:

    function createfilterwidget(column, columnElement, widget) {
        widget.jqxDateTimeInput({ firstDayOfWeek: 1 });
    }
    
    $("#jqxgrid").jqxGrid(
    {
        width: 850,
        source: dataAdapter,
        showfilterrow: true,
        filterable: true,
        pageable: true,
        autoheight: true,
        editable: true,
        localization: getLocalization(),
        selectionmode: 'singlecell',
        columns: [
            { text: 'Name', columntype: 'textbox', filtertype: 'textbox', datafield: 'name', width: 180 },
            { text: 'Produkt', filtertype: 'textbox', datafield: 'productname', width: 220 },
            { text: 'Datum', datafield: 'date', columntype: 'datetimeinput', filtertype: 'date', width: 210, cellsalign: 'right', cellsformat: 'd', createfilterwidget: createfilterwidget },
            { text: 'Datum2', datafield: 'date2', columntype: 'datetimeinput', filtertype: 'date', width: 210, cellsalign: 'right', cellsformat: 'd', createfilterwidget: createfilterwidget },
            { text: 'Qt.', datafield: 'quantity', columntype: 'numberinput', filtertype: 'textbox', cellsalign: 'right', width: 60 },
            { text: 'Preis', datafield: 'price', columntype: 'numberinput', filtertype: 'textbox', cellsformat: "c2", cellsalign: 'right' }
        ]
    });

    Best Regards,
    Dimitar

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

    Grid calendar filter first day of week. #81921

    jonatas
    Participant

    Hello,

    I’m doing a date filter and time on the grid using the filtertype ‘range’ for date and time. The filter between dates function correctly, but when performing the filter by time range, for example, this time filter, minute and second is not made the filter on the grid, how can I solve this problem?

    Grid calendar filter first day of week. #81922

    jonatas
    Participant

    Hello,

    I’m doing a date filter and time on the grid using the filtertype ‘range’ for date and time. The filter between dates function correctly, but when performing the filter by time range, for example, this time filter, minute and second is not made the filter on the grid, how can I solve this problem?

    When done the filter column date and time through the input date range and team, I note that there is no change in the values ​​when you run the filter event

     $ ( “# JqxgridHistorico”). Bind ( “filter” function (event) {

        filterinfo var = $ ( “# jqxgridHistorico”) jqxGrid ( ‘getfilterinformation.’);
        var info;

        var filterGroup filterinfo = [0];
        var filters filterGroup.filter.getfilters = ();
        for (var j = 0; j <filters.length; j ++) {

          info + = “\ nFilter”;
          info + = “\ nValue:” + filters [j] .value;
          info + = “\ nCondition:” + filters [j] .condition;
          info + = “\ nOperator:” + filters [j] .operator;
        }

    where the values ​​are not changed

    Filter:
    Value: Mon Feb 15 2016 00:00:00 GMT-0200 (Brazilian Summer Time)
    Condition: GREATER_THAN_OR_EQUAL
    Operator: 0
    Filter:
    Value: Mon Feb 15 2016 10:56:00 GMT-0200 (Brazilian Summer Time)
    Condition: LESS_THAN_OR_EQUAL ”

    The value of the start time is not changed, it remains to 00:00:00

    only the start time is changed, eg 10:56:00


    Dimitar
    Participant

    Hello jonatas,

    Please make sure you are using the latest version of jQWidgets (4.0.0). If the issue persists, could you, please, share a jsEditor example that reproduces it?

    We are looking forward to your reply.

    Best Regards,
    Dimitar

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

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

You must be logged in to reply to this topic.