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

Filtering a DateTime Column with a Datepicker

3 Answers 1383 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Flo
Top achievements
Rank 1
Flo asked on 11 Sep 2014, 08:41 AM
Hy,

I've got a Column with DateTime Values! eg.: "2014/09/11 10:00"

Our Customer wants to filter the Column by Datepicker and only one field (filterable.extra: false) - so if I add a Datepicker Filter (not DateTimepicker) and wanna filter "is equal" to "2014/09/11" the Grid don't wanna display anything - Problem ist that the filtered Date is "2014/09/11 00:00", whicht isn't equal because of the time - how can I fix this issue?

In the Column I have to display the date with the time, filtering should ignore the time!

greetings from Austria
Flo

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 15 Sep 2014, 07:04 AM
Hi Florian,

The Kendo UI Grid will filter the DateTime column using a DateTime value and will not ignore the time part of the object. As you want to display the time value, but not include it in the filter, the only way to achieve this is by using an external filter, and custom filter operation, as explained in the following forum thread:

http://www.telerik.com/forums/date-filter-doesn-t-ignore-the-time

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Flo
Top achievements
Rank 1
answered on 15 Sep 2014, 07:52 AM
Thanks for your answer!

I've done my usecase with an other "simple" workaround! In case that there is no problem on backend side to deliver 2 dates (one with time, one without time) my JSON delivers this 2 dates - for the grid I'm using the date without time, for the display I'm rendering a custom template, using the date with time! So, the applied Datepicker Filter delivers correct result by a Date Basis!

I know, it's a little bit dirty but works in my case!

Greetings from Austria
Flo
0
Kiril Nikolov
Telerik team
answered on 15 Sep 2014, 01:26 PM
Hello Florian,

I am happy to hear that you found a solution and shared it with us.

I will go ahead and mark this thread as resolved, but in case you have any further questions, please do not hesitate to contact us.;

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Flo
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Flo
Top achievements
Rank 1
Share this question
or