I would like to specify the date format for a new date field in my CMS page form. I have created a new cms_page_form.xml field which links to a date field in the MySQL database table cms_page. However, MySQL rejects the field because it is in the wrong format. I have tried setting the format in many different ways: https://i.imgur.com/xjtrrYc.png (also without the item options array), literally spending hours trying to set it in cms_page_form.xml with the official documentation for the Date component not providing much of any help: https://devdocs.magento.com/guides/v2.4/ui_comp_guide/components/ui-date.html
I have even tried creating my own UI component (also specifying the new component /form/element/date etc of course) with just time as an example, and just time does work: https://i.imgur.com/PhrWqcp.png however when I change it to use date and specify the custom date format in JavaScript, it still doesn’t work: https://i.imgur.com/R1XuXYW.png it just uses today’s date in the wrong format: https://i.imgur.com/elamryD.png
Here is my cms_page_form.xml with the date formatting not working: https://i.imgur.com/xjtrrYc.png
When I load the CMS page, by default, it displays “Invalid date”: https://i.imgur.com/kVv7I2o.png then quickly changes over to today’s date – in the wrong format: https://i.imgur.com/OcfoH0E.png
All I want is a date input with the format of yyyy-MM-dd in my CMS page form in Magento 2.4.2
If anyone could help me with this I would really appreciate it.
Thanks.