Hi Team,
When a date filter is applied in the new Filter widget, the preview looks like: "Date Is After 'Tue Jan 01 2019 00:00:00 GMT+0000 (Greenwich Mean Time)'" -- I'd like to be able to customize the displayed date format, something like adding "format:"{0:dd/MM/yyyy}" to the 'fields' object.
Thanks
Hi, Mat,
Thank you so much for this feature request. I can definitely see the value in it and I have proposed to my Team Lead that we include it in our pipeline. It was accepted and we will be implementing it. Meanwhile, you could format the filter dates value programmatically. I wrote this function that seems to do the job and here is a runnable Dojo that shows it in action:
https://dojo.telerik.com/@bubblemaster/ISiqIMax/2
function formatDates(e) {
var filterValues = $(".k-filter-preview-value");
$.each(filterValues, function(i, item){
var valueString = $(item).text().replace("'", "");
var date = kendo.parseDate(valueString)
if(date){
var formattedDate = kendo.toString(date, "dd/MM/yyyy");
$(item).text(formattedDate);
}
})
}
Let me know in case you have further questions or ideas regarding this future functionality.
Kind Regards,
Alex Hajigeorgieva
Progress Telerik