jQuery UI Widgets Forums Grid On click datetimeinput cell, date does -1 day

This topic contains 6 replies, has 2 voices, and was last updated by  tazias4 6 years, 9 months ago.

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

  • tazias4
    Participant

    Hi guys, here is my code. The problem is that when I click a datetimeinput type cell, the date in the cell goes -1 day.

    So onclick the cell will show “2018-01-10” instead of “2018-01-11” and the calendar popup shows “2018-01-10” too. when I click out it changes the value to “2018-01-10”. I do not understand why my code would do this.

        {{ HTML::script('packages/jquery/jquery-3.2.1.js') }}
        {{ HTML::style('packages/jqwidgets/styles/jqx.base.css') }}
        {{ HTML::script('packages/jqwidgets/jqx-all.js') }}
    
        <div id="questionGrid_type"></div>
        <script>
            var arrayData_detail = [
                {RBD:"2018-01-11"},
                {RBD:"2018-01-11"}
            ];
            var sourceDetailed =
                {
                    localdata: arrayData_detail,
                    datatype: "array",
                    datafilds: [
                        {name: 'RBD', type: 'date', format: 'yyyy-MM-dd'},
                    ]
                };
            var dataAdapter = new $.jqx.dataAdapter(sourceDetailed);
            $("#questionGrid_type").jqxGrid(
                {
                    source: dataAdapter,
                    editable: true,
                    editmode: 'selectedcell',
                    columns: [
                        {
                            text: 'RBD',
                            datafield: 'RBD',
                            columntype: 'datetimeinput',
                            cellsformat: 'yyyy-MM-dd',
                            }
    
                    ]
                }
            );
    
        </script>

    Thanks


    Stanislav
    Participant

    Hello tazias4,

    We did some tests on but we didn’t find anything.
    The way we tried to reproduce it was:
    1) We single click on one of the cells
    2) The data gets selected, and the selection jumps to the year right away
    2.5) The day number doesn’t change

    Have you updated your project to the latest version?
    Please take a look at the version and if not, give us some more information on this matter, please.

    Best Regards,
    Stanislav

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


    tazias4
    Participant

    I was able to reproduce it:

    https://jsfiddle.net/tazias4/bLzyqq0L/


    Stanislav
    Participant

    Hello tazias4,

    Thank you for the report!
    We will be looking at this issue in the near future and it will be noted in our Release History when it is fine.

    As for a workaround, I would suggest you making it so the client can only pick dates from the calendar for the time being.

    Best Regards,
    Stanislav

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


    tazias4
    Participant

    This is what the client is suppose to be doing in the first place. It affects the calendar too.


    Stanislav
    Participant

    Hello tazias4,

    What do u mean it affects the calendar too?
    When I start editing and open the calendar, I can pick a date with no problem and when I select it, the date in the cell gets updated.
    An issue only occurs when I try to change the date manually.

    I also tried it with different cellsformat, with no effect.

    Best Regards,
    Stanislav

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


    tazias4
    Participant

    What I was saying is that the datepickers date changes according to the cell value. When you choose the date though tehre is not issue and the cell is properly updated. The most bizar part is that will only occure the first time a cell is selected for change prior to reloading the page.

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

You must be logged in to reply to this topic.