joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[7.0][RFC] native date picker [a11y] [i8n]

Open brianteeman opened this issue 1 month ago • 4 comments

Yes I know I wrote joomla 7 but this would be a big change and I think that would be the first version we could apply it to.

We currently use javascript as a datepicker. It is very difficult to maintain, is not accessible and is missing functionality that people want in a modern app eg start/end limits and we have lots of open bugs https://github.com/joomla/joomla-cms/issues?q=is%3Aissue%20state%3Aopen%20calendar

Historically the reason for using our own datepicker is so that it can support non-gregorian calendars and historically javascript was the only way to create a datepicker.

Today (nov 2025) there are even fewer countries that use a non-gregorian calendar for civil dates.[1]

Today there is no reason to use a javascript datepicker at all for gregorian calendars. We can use the browser native datetime functionality. It is fast, maintenance free, (more) accessible and offers the missing functionality users are requesting

More information and examples at https://pikaday.dbushell.com/

[1] Non-gregorian calendar Iran, Afghanistan, Ethiopia, Thailand (year counting).

brianteeman avatar Nov 12 '25 10:11 brianteeman

It should be easy. Can just replace calendar to datetime field in all XMLs, or extend CalendarField from DatetimeField field class.

However, 2 questions opened:

  • We need to agree to drop support for non-gregorian calendars. And (in theory) we can provide API for translators to load their JavaScript to alter datetime input to load non-gregorian calendar.
  • The translations is impossible. Joomla provides multi-language interface, however the translations for the native date input will be from the browser. And for example when you try to use Joomla on PC of your friend from France and login to Joomla selecting English interface the Date input will be French. For me it is not a problem, but this can make unhappy some peoples.

Fedik avatar Nov 12 '25 15:11 Fedik

I actually see it as a bonus that the language of the calendar will always be in my language - what I am not sure of yet is if the ui supports the correct start of the week for that local.

brianteeman avatar Nov 12 '25 16:11 brianteeman

what I am not sure of yet is if the ui supports the correct start of the week for that local.

Should work. And depend from User OS configuration.

Fedik avatar Nov 12 '25 17:11 Fedik

I am not a representative of the groups that use the Solar Hijri calendar. I just wanted to mention regarding https://github.com/joomla/joomla-cms/issues/46442 that there is also this link: https://babakhani.github.io/PersianWebToolkit/doc/persian-date/

But I don't know what is correct. I only know that fundamental changes and adaptation put a lot of pressure on extension developers. Therefore, perhaps a gradual change with simultaneous support for the old calendar could be a solution, if it's feasible.

mortezakowkabi avatar Dec 05 '25 16:12 mortezakowkabi