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.
-
Author
-
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
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 changeHave 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,
StanislavjQWidgets Team
http://www.jqwidgets.com/I was able to reproduce it:
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,
StanislavjQWidgets Team
http://www.jqwidgets.com/This is what the client is suppose to be doing in the first place. It affects the calendar too.
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,
StanislavjQWidgets Team
http://www.jqwidgets.com/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.
-
AuthorPosts
You must be logged in to reply to this topic.