Last Updated: 04 Dec 2019 14:59 by ADMIN
Release R1 2020
Created on: 01 Oct 2019 12:20
Category: Filter
Type: Feature Request
Formatting expressionPreview in Filter

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.


1 comment
Alex Hajigeorgieva
Posted on: 08 Oct 2019 06:36

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:

 function formatDates(e) {
        var filterValues = $(".k-filter-preview-value");
        $.each(filterValues, function(i, item){
          var valueString = $(item).text().replace("'", "");
          var date = kendo.parseDate(valueString)
            var formattedDate = kendo.toString(date, "dd/MM/yyyy");

Let me know in case you have further questions or ideas regarding this future functionality.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.