Created date in node author details summary not displayed in current locale

Created on 23 October 2024, 6 months ago

Problem/Motivation

When creating or editing a node, the author details summary displays the created date if the created date field is filled in. The problem is that the format is always YYYY-MM-DD, even when the user's browser or operating system has a different locale.

Proposed resolution

Because the summary is generated by javascript it cannot use Drupal's date formats. It uses the input value of the created date input field instead, without formatting it.

Proposed resolution is to use the widely supported Date.toLocaleDateString method to format the string to the user's locale.

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

node system

Created by

πŸ‡§πŸ‡ͺBelgium klaasvw

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024