Categories
CMS Drupal Mastering Development

Cannot change the date format for user submitted data in D8 Webform confirmation emails

The confirmation emails sent by Webform (running under Drupal 8.9.7) on submission are in US format "m/d/Y" for all date fields that the user entered on the form (but not for system generated dates such as the time the form submission was made, which are in UK format). I need to change them to UK format "d/m/Y" since that is what my users expect.

Web research tells me that Webform picks the date format for emails from the system’s "default medium date". Not so. My system’s default medium date format is "D d/m/Y – H:i". What I get for the date fields that the user submitted is "D, m/d/Y – H:i" (note also the subtle difference – one doesn’t have a comma, the other does).

I have varied the format of all the default date formats, but nothing changes.

Guidance on how to fix or on a workaround would be appreciated.

Leave a Reply

Your email address will not be published. Required fields are marked *