plone / plone/mockup

pat-datetime-picker relies on browser language configuration instead of Plone configuration

Open
#1,328 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

01 type: bug
Dominant language
JavaScript
Stars
57
Forks
103
Avg merge
10h 25m
Merged PRs (30d)
18

Description

I don't know if I should open this here or in Patternslib...

The pat-datetime-picker pattern used in Plone 6 relies on browser interface language to render itself, producing different output in at least Firefox and Chrome.

This is Firefox configured to have the interface in basque:

photo1686811456(1)

This is Chrome configured to have the interface in english (I can't set basque as interface language)

photo1686811456

As you can see, not only the date picker shows in English, but the datetime format of the input box is also formatted in English.

It looks like the pat-datetime-picker degrades to HTML5 date picker which relies on the browser language.

I would say this is a bug. The date picker should be rendered not in the browser language but in the content language. I don't know if this can be set in the HTML5 standard date-picker (I don't see how here, so perhaps we should render the JS date-picker anyway?

cc: @libargutxi

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the pat-datetime-picker pattern and how it falls back to the HTML5 date picker in Plone 6. Compare the browser-dependent rendering described for Firefox and Chrome, then determine how the content language should control the picker and input format. Done means the date picker and datetime format follow Plone configuration consistently across browsers.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript
Domain
frontend, internationalization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.