Date formatting is ignored on date-only fields for a published site
Last updated 2022-02-10 ·Reference W-1785289 ·Reported By 2 users
Summary
When publish a page that has Data Element for a Date field type with the format of MMM dd, yyyy, the date format is ignored and does not display as expected.
Repro
1. Create a date-only field on any sobject. Make sure to modify the FLS for the new field on the sites guest user profile.
2. On a site page, add a date repeater for the sobject.
3. Add a data element for the new field. Select a date format or specify a custom date format (e.g. MMM, dd yyyy).
4. Preview the site -- notice the selected date format is respected.
5. Publish the site, and notice the formatting is ignored. The date will be displayed in the format yyyy-mm-dd.
Workaround
As a workaround, using a date-time field (as opposed to date-only) should avoid the issue. You could also add a date-time formula field to the sobject to convert the date-only field. (note, this is just a temporary workaround until the bug is fixed).
Reported By (2)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.