I am running into an issue with allowing copy/paste of dates into the filter and cell input fields. Currently, the date fields have validation to support MM/dd/yyyy, and users of the app may be trying to copy dates in that are MM/dd/yy. I would expect Kendo to auto format the date to MM/dd/yyyy after the paste happens, or at least allow support for that, but it doesn't seem to happen.
In the cell, when putting in MM/dd/yy, a validation message appears saying the date is invalid, and there doesn't appear to be a way to override that. In the filter, when putting in MM/dd/yy and submitting the filter, it doesn't stick and completely ignores the date put in.
Is there any way with the latest version of Kendo (I am on 16) to allow for different date formats in these fields, or is there the possibility that this is something coming in the future?
Hi Andrew,
You can set the format for the date column using the columns.format option:
- https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.format
Starting with the 2024 R3 release the Grid provides auto adjust feature in the DatePicker component. You can read more in the following link:
- https://docs.telerik.com/kendo-ui/controls/datepicker/auto-adjust
However, even if you try to enable the auto adjust in the DatePicker editor (as in the Dojo linked here) the date will be adjusted only when the user type a date, but not when pasting a value.
I would suggest logging a feature request for improving the behavior when pasting in our Feedback Portal and describe in details the required behavior:
- https://feedback.telerik.com/kendo-jquery-ui/
Based on the popularity of the request it could be added for future implementation.
Let me know in case you have any additional questions.
Regards,
Neli