Missing support for a non-English Datepicker

Created on 25 October 2023, about 1 year ago

Problem/Motivation

I'm using Drupal 10.1.5 and jQuery UI Datepicker 2.0.0 for a Dutch and English multilingual website with a webform 6.2.0-beta6. It seems that the Datepicker doesn't give support for Dutch and when choosing a date it shows the Datepicker in English and returns the date in English. Therefore the validation fails and the user can't submit a webform.

It's also mentioned as a difference between 1.x and 2.x at: https://www.drupal.org/project/jquery_ui_datepicker/issues/3327735 💬 Difference between 1.x and 2.x branches Active

Steps to reproduce

  1. Create a webform with a date field with the datepicker enabled. Choose longdate format (l, F, j, Y).
  2. Switch the language of the website to non-English (Dutch).
  3. Select a date (notice the datepicker is still in English and the date returned is also in English format)
  4. Submit the webform and the validation fails (invalid date).

Proposed resolution

The datepicker should switch it's language and return the date format in matching language (or even follow custom formats used on that specific webform element).

Other solution could be that the Datepicker is disabled for other languages?

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇳🇱Netherlands Tr4nzNRG

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

Comments & Activities

Production build 0.71.5 2024