Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
215
Custom String Date Filter
posted

Hi

I am having issues with date filters. The problem is that since there is no date type in JSON all the data comes from server with string representations of dates. Since the dataType date only supports actual date objects this doesn't work. So unless we pre-enrich all our data to convert to actual date objects we don't get date filtering. Rather than pre-enrich data I was trying to write a custom date filter which would convert the date strings to dates. The trouble for that is that if I have the column data type as string then it gives string text filter options. I have to use dataType of date for it to properly support picking dates. However, if I use the dataType of date then it tries to call toDateString() method on the values which obviously isn't supported and so throws error. I am using excel style filtering. Is there anyway to have the data stay as a string but get the date filter to support date operations?

Thanks