简体   繁体   中英

Date filter on Kendo UI Angular 2 Grid

I am using the kendo-grid from the Kendo UI Angular 2 library. I would like to know if and how I can set a date filter - equivalent to the boolean and numeric values on the filter attribute below:

<kendo-grid-column field="UnitPrice" filter="numeric">
</kendo-grid-column>
<kendo-grid-column field="Discontinued" filter="boolean">
</kendo-grid-column>

Many thanks.

Update as of 11th April 2017

From Telerik:

"Currently there is not built-in date filter, as the DateInput component was not ready when the filter row functionality has been released. That said we will add such filter in some of the following releases"

you can filter date by below syntax in kendo-grid.

<kendo-grid-column field="Bill-Date" title="Sales Date" filter="date"> </kendo-grid-column>

these is for additional : these shows filter by calendar animations. add browser/animation file into your module.ts

As per my knowledge still Kendo UI not support date filter in angular-2, so you have to use custom filter.

Create custom filter with column type and set HTML5 input type according to that.

For normal string filter for date value do not specify any filter type in column.

<kendo-grid-column field="DateField">
</kendo-grid-column>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM