Issue with timezone on date column filter

3 posts, 0 answers
  1. blu393
    blu393 avatar
    2 posts
    Member since:
    Apr 2019

    Posted 28 Jan Link to this post

    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. blu393
    blu393 avatar
    2 posts
    Member since:
    Apr 2019

    Posted 28 Jan in reply to blu393 Link to this post

    This is probably the same issue https://github.com/telerik/kendo-ui-core/issues/5306
  3. Rumen
    Admin
    Rumen avatar
    14170 posts

    Posted 29 Jan Link to this post

    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.
Back to Top