I just upgraded to version 2.7.2. The new filtering dialog box displays dates in the European format, and not the US format. How can I change this? The attached JPG shows it is displayed as “02/04/2019”, and I would like it to be “04/02/2019”.
Thank you for writing to us.
The desired date format displayed in the filters can be set using the dateFormat parameter in the filter field of the options object:
Here is a JSFiddle example.
Please let us know if this works for you and if you have further questions.
I have the similar issue. In my case I need to support format string like this ‘yyyy-MM-dd’ for example. Also I tried to put it into your JSFiddle example, but it doesn’t work.
Is it possible to use this format string?
Thanks for your help.
Thank you for reaching out to us.
Our team would like to explain that
filter.dateFormat property of the
options object has only two possible values:
"MM/dd/yyyy", as described in our documentation.
To use another date pattern, we suggest utilizing the
datePattern property of the
options object. We have modified the JSFiddle provided earlier to demonstrate this functionality. Please note that this property also affects the pattern displayed on the grid.
Please let us know if it helps.
Feel free to contact us in case other questions arise.
Thanks for your answer.
As I see, date pattern on the filter dialog on your example does not match with required one. Pattern applied only for the grid but not for the filter (I’ve attached a screenshot)
Thank you for your feedback and for providing the screenshot.
It helped to get a better understanding of your requirement.
You are right about the fact that the
options.datePattern property does not affect the date filter. It allows formatting dates on the grid and in the members filter instead.
In its turn, the formatting in the date filter can only be adjusted using the
filter.dateFormat property mentioned earlier. However, it only supports two possible values:
"MM/dd/yyyy". Currently, other formats are not supported in the date filter.
Please contact us in case other questions arise.