Open
Description
Preconditions and environment
- 2.4.6-p5
Steps to reproduce
I've created a ui component form
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">sync_documents_form.sync_documents_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Sync Documents</item>
<item name="template" xsi:type="string">templates/form/collapsible</item>
</argument>
<settings>
<buttons>
<button name="save" class="Mv\CliDocumentImporter\Block\Adminhtml\SyncDocuments\Button\Submit"/>
</buttons>
<namespace>sync_documents_form</namespace>
<dataScope>data.general</dataScope>
<deps>
<dep>sync_documents_form.sync_documents_form_data_source</dep>
</deps>
</settings>
<dataSource name="sync_documents_form_data_source" component="Magento_Ui/js/form/provider">
<settings>
<submitUrl path="clidocumentimporter/customer/syncsubmit"/>
</settings>
<dataProvider class="Mv\CliDocumentImporter\Ui\DataProvider\SyncDocuments" name="sync_documents_form_data_source">
<settings>
<requestFieldName>id</requestFieldName>
<primaryFieldName>id</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="general">
<settings>
<label translate="true">General</label>
</settings>
<field name="id" formElement="hidden">
<settings>
<dataType>text</dataType>
<dataScope>id</dataScope>
</settings>
</field>
<field name="customer_ids" formElement="hidden">
<settings>
<dataType>text</dataType>
<label translate="true">Customers</label>
<dataScope>customer_ids</dataScope>
</settings>
</field>
<field name="date_from" formElement="date">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="options" xsi:type="array">
<item name="showsTime" xsi:type="boolean">false</item>
<item name="inputDateFormat" xsi:type="string">y-MM-dd</item>
<item name="outputDateFormat" xsi:type="string">y-MM-dd</item>
<item name="pickerDateTimeFormat" xsi:type="string">y-MM-dd</item>
</item>
</item>
</argument>
<settings>
<dataType>timestamp</dataType>
<label translate="true">Date From</label>
<dataScope>date_from</dataScope>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
<rule name="validate-date" xsi:type="boolean">true</rule>
</validation>
<notice translate="true">Enter the starting date to sync from</notice>
</settings>
</field>
</fieldset>
</form>
But I notice that the date field appears with the wrong date format.
I want to force display and input value as the equivalent of php's 'Y-m-d' format.
However no matter what I put in the config options
https://developer.adobe.com/commerce/frontend-core/ui-components/components/date/
the display is like this
And the input value is passed as seen in the screenshot.
Expected result
My field renders with the appropriate date format.
Actual result
The field appears in the wrong format.
Additional information
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Activity
m2-assistant commentedon Sep 26, 2024
Hi @ioweb-gr. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.
@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
m2-assistant commentedon Sep 27, 2024
Hi @engcom-November. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branchDetails
- If the issue is reproducible on2.4-develop
branch, please, add the labelReproduced on 2.4.x
.- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
Issue: Confirmed
once verification is complete.engcom-November commentedon Sep 27, 2024
Hello @ioweb-gr,
Thank you for the report and collaboration!
Verified this issue on 2.4-develop, and it's reproduced.
When creating a ui component of date field, the date format is not being changed as specified.
Please take a look at the screenshot:

Even though the date format is specified as y-MM-dd the default format is rendered.
Hence confirming this.
Please find the module used to reproduce this issue.
I39218V.zip
Thank you.
github-jira-sync-bot commentedon Sep 27, 2024
✅ Jira issue https://jira.corp.adobe.com/browse/AC-13174 is successfully created for this GitHub issue.
21 remaining items