This is a migrated thread and some comments may be shown as answers.

Issue with timezone on date column filter

2 Answers 1278 Views
Grid
This is a migrated thread and some comments may be shown as answers.
blu393
Top achievements
Rank 1
blu393 asked on 28 Jan 2020, 02:04 PM

My grid receives data in JSON format and all dates are in UTC time and formatted to local time using kendo.toString and it works fine.

The problem begins with filters for date time column:

column.filterable = {
            ui: function (element) {
                return element.kendoDatePicker({
                    format: kendoHelpers.dateTimeFormat
                });
            },
            operators: {
                date: {
                    lt: operators.date.lt,
                    gte: operators.date.gte,
                }
            }
        };

 

I will try to explain it on a real scenario:
I'm in UTC+01 timezone and when I want to filter all dates before 27-01-2020 16:30 it correctly saves Date object in grid.filter.filters array (with timezone offset)

but when filter request is being sent to the server it ignores timezone and sends filter:InsertDate~lt~datetime'2020-01-27T16-30-00' (should be 15:30 or with timezone)

 

Is there anyway to modify filter value or change it's format to send also information about timezone?

2 Answers, 1 is accepted

Sort by
0
blu393
Top achievements
Rank 1
answered on 28 Jan 2020, 02:50 PM
This is probably the same issue https://github.com/telerik/kendo-ui-core/issues/5306
0
Rumen
Telerik team
answered on 29 Jan 2020, 11:17 AM

Hi blu393,

Thank you for reporting this problem!

Indeed, the issue reported here is the same as the one discussed at Convert grid filter date field to UTC. Please subscribe to the bug report item to get news on its development.

Best Regards,
Rumen
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
ashok
Top achievements
Rank 1
commented on 18 Nov 2021, 05:22 AM

Is this issue is resolved in any newer version? 
Rumen
Telerik team
commented on 18 Nov 2021, 08:18 AM

I am afraid that the issue is still open. Please cast your vote to raise its popularity - https://feedback.telerik.com/kendo-jquery-ui/1432421-convert-grid-filter-date-field-to-utc

Thank you!
Tags
Grid
Asked by
blu393
Top achievements
Rank 1
Answers by
blu393
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or