How to set custom control in the kendo grid filter row?
I have a date column in my grid and I want to set a custom date range filter for that column.
Add comment
Answers (1)
Add AnswerHello, @Raj Dev
You can call a custom function for the template property of the filterable cell. Just like the below.
filterable: { cell: { template: customFilter }, showOperators: false } function customFilter(args) { var filterCell = args.element.parents(".k-filtercell"); filterCell.empty(); filterCell.html('<input type="text" name="datefilter" class="k-textbox k-FullWidth" value="" autocomplete="off" readonly/>'); $('input[name="datefilter"]').daterangepicker({ autoUpdateInput: false, showDropdowns: true, locale: { cancelLabel: 'Clear' } }); }