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

Kendo Grid filter date

1 Answer 286 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 08 May 2018, 09:10 PM

One of the column in the Grid has date value 2018-05-03 , when I do filter and specify date = 2018-05-03, it send 5/3/2018 12:00:00 AM to the server.

Question:

1. How to prevent sending  12:00:00 AM, or how to exclude the timestamp?

2. during filter, how do I change the date format to year-month-day, instead of month/day/year

 

Thanks,

Bryian Tan

1 Answer, 1 is accepted

Sort by
0
Accepted
Svet
Telerik team
answered on 10 May 2018, 10:57 AM
Hi Bryian,

The value of the DatePicker is midnight UTC by default, but is treated with the local offset by the browser.

If we do not need the time offset or/and time then we need to stringify the Date manually in the required format - ("year-month-day" or any other). We can do that using the IntlService as demonstrate in the following example:

https://plnkr.co/edit/GApEAfs5jHDZJiW8Pvar?p=preview

I hope this helps.

Regards,
Svetlin
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Patrick
Top achievements
Rank 1
Answers by
Svet
Telerik team
Share this question
or