RTC Language Change NPM Resource Changed bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar cyrez
cyrez
18 Apr 2026

Improvements:

  • Enhance parseFieldDate with strict mode parameter (date-helper.js). (edit 2026-07-19)
  • Updates the calendar picker during manual entry if it is open. (edit 2026-07-19)
  • Manage month index for Jalali calendar. (edit 2026-07-19)
  • Added event listener to validate date and time input.
  • Fix RTL Hour and Minutes selectors in calendar picker.
  • Fix RTL AM/PM selection in 12h mode.

Pull Request resolves #45933, #46013 and #47645.

When opening the calendar picker in calendar input field, modifying manually the input won't update the datetime value for data-alt-value attribute, resulting in input manual changes for date and or time not saved.

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

  • Add event listener to validate date and time on input change.
  • Validate date and time on input change, and make sure format is correct (eg. Jahali datetime converted to gregorian on save to database).
  • Fix RTL issue with Hour and Minutes selectors in calendar picker.
  • Fix RTL AM/PM selection in 12h mode.

Testing Instructions

  • Reproduce the example in the video added to this issue: #46013
  • Reproduce the steps described in this issue: #45933
  • Test with a RTL language (eg. Jalali (non-gregorian) and Arabic, Hebrew (gregorian)) and reproduce before patch the issue shown in the video here: #47645. Check also that when in 12h mode, changing between AM and PM or vice versa causes the same issue. Then apply patch, and check that when changing hour and or time in calendar picker does not switch the hour/minutes fields, and that hour and minutes is correctly populated in the input field (HH:MM:SS), also when changing between AM and PM or vice versa in 12h mode.

Note for Jalali: the Jalali date-helper.js does not manage the seconds, and is always then reverted to 00 even if you enter seconds in the input field. This is not related to the core calendar.js, but to the local datetime helper for Jalali. IMO, seconds is not really useful in majority of cases, but better to mention this specific difference between gregorian and Jalali calendar type.

Actual result BEFORE applying this Pull Request

  • Manual edit of date in input is not stored if calendar picker is open.
    See #46013 (video)
  • Hour and minutes fields inconsistency and issue in a RTL language.
    See #47645 (video)
  • Changing between AM and PM in 12h mode in RTL language causes also the hour and minutes fields inconsistency.
    See comment #47626 (comment)
  • The date picker does not update if it is open while the date and time are manually modified in the input field.

Expected result AFTER applying this Pull Request

  • You can use calendar picker to set date and time as well as manually setting the date and or time or using both (calendar picker for date, and time in manual for example).
  • It should always validate the date and time visible in the input on save.
  • The date format stored to database should always be in gregorian format YYYY-MM-DD HH:MM:SS
  • The hour and minutes work correctly in RTL language.
  • Changing between AM and PM and vice versa works in 12h mode in RTL language.
  • When the date picker is open, it now updates when the input field is manually modified.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

Votes

# of Users Experiencing Issue
3/3
Average Importance Score
5.00

avatar cyrez cyrez - open - 18 Apr 2026
avatar cyrez cyrez - change - 18 Apr 2026
Status New ⇒ Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Apr 2026
Category ⇒ JavaScript Repository NPM Change
avatar exlemor exlemor - test_item - 19 Apr 2026 - Tested successfully
avatar exlemor
exlemor - comment - 19 Apr 2026

I have tested this item βœ… successfully on 9769b06

I have successfully tested this! Merci @cyrez ;)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar brianteeman
brianteeman - comment - 19 Apr 2026

did you also test this with non-gregorian calendars such as jalali with the farsi language pack

avatar cyrez
cyrez - comment - 19 Apr 2026

did you also test this with non-gregorian calendars such as jalali with the farsi language pack

The code change should not affect non-gregorian calendars, as same issue, and same check for non-gregorian calendar for input event handler.
But i just tested with Farsi. Same issue before. After applying the patch, the issue is fixed as well (eg. you can pick a day in the calendar, set manually the time (for example, enter for the first 2 digits "Ϋ°Ϋ°") and on save, it keeps now the manual edit from the input.

Of course, another test with a non-gregorian calendar would be better ;-)

avatar krishnagandhicode krishnagandhicode - test_item - 19 Apr 2026 - Tested successfully
avatar krishnagandhicode
krishnagandhicode - comment - 19 Apr 2026

I have tested this item βœ… successfully on 9769b06

Manual time edits in the Jalali(farsi) calendar saves successfully with patch.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar krishnagandhicode krishnagandhicode - test_item - 19 Apr 2026 - Tested unsuccessfully
avatar krishnagandhicode
krishnagandhicode - comment - 19 Apr 2026

I have tested this item πŸ”΄ unsuccessfully on 9769b06

Changing my test result to Unsuccessful.

I previously marked this as a successful test but I need to retract that. Due to my lack of familiarity with Farsi and the Jalali calendar numerals, I misinterpreted the output during my testing and incorrectly thought it had saved properly.

To be safe I am changing my vote to unsuccessful for now. I highly recommend that someone who better understand Farsi gives this a proper test.

Sorry for the confusion!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar richard67
richard67 - comment - 19 Apr 2026

I have tested this item πŸ”΄ unsuccessfully on 9769b06

Changing my test result to Unsuccessful.

I previously marked this as a successful test but I need to retract that. Due to my lack of familiarity with Farsi and the Jalali calendar numerals, I misinterpreted the output during my testing and incorrectly thought it had saved properly.

To be safe I am changing my vote to unsuccessful for now. I highly recommend that someone who better understand Farsi gives this a proper test.

Sorry for the confusion!

@krishnagandhicode If that means that you were not able to test, then please change to "Not tested". Unsuccessful should only be used if a human test fails for a PR or if the PR breaks something.

avatar krishnagandhicode krishnagandhicode - test_item - 19 Apr 2026 - Not tested
avatar krishnagandhicode
krishnagandhicode - comment - 19 Apr 2026

I have not tested this item.

@krishnagandhicode If that means that you were not able to test, then please change to "Not tested". Unsuccessful should only be used if a human test fails for a PR or if the PR breaks something.

Alright - but According to me this does not work for farsi/jalali calendar.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar cyrez
cyrez - comment - 19 Apr 2026

I have not tested this item.

@krishnagandhicode If that means that you were not able to test, then please change to "Not tested". Unsuccessful should only be used if a human test fails for a PR or if the PR breaks something.

Alright - but According to me this does not work for farsi/jalali calendar.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

My test with Farsi (and the patch applied):

  • Open calendar picker
  • Select a day
  • Manually changing the time in the input directly (not using time selector from calendar picker)
  • Save.
  • Result: the time edited manually as set in input is stored.
Enregistrement.de.l.ecran.2026-04-19.a.18.56.56.mov
avatar cyrez
cyrez - comment - 19 Apr 2026

@krishnagandhicode could you explain what according to you, does not work with Farsi?
And did you test it as well with a gregorian calendar (English for example) to compare your result?
Thanks!

Note: the code change is not supposed to affect non-gregorian calendar, so i'm a bit surprized about the result of not working with a Farsi calendar.

avatar krishnagandhicode
krishnagandhicode - comment - 19 Apr 2026

@krishnagandhicode could you explain what according to you, does not work with Farsi? And did you test it as well with a gregorian calendar (English for example) to compare your result? Thanks!

Note: the code change is not supposed to affect non-gregorian calendar, so i'm a bit surprized about the result of not working with a Farsi calendar.

I completely agree on that and most probably it's something not okay on my side : (
( Well my test for gregorian calendar was a Successful test)

Okay I will give it another try.

avatar krishnagandhicode krishnagandhicode - test_item - 19 Apr 2026 - Tested successfully
avatar krishnagandhicode
krishnagandhicode - comment - 19 Apr 2026

I have tested this item βœ… successfully on 9769b06

Recording.2026-04-19.230419.mp4

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.
avatar richard67 richard67 - change - 19 Apr 2026
Status Pending ⇒ Ready to Commit
Labels Added: NPM Resource Changed bug PR-5.4-dev
avatar richard67
richard67 - comment - 19 Apr 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar muhme muhme - test_item - 21 Apr 2026 - Tested unsuccessfully
avatar muhme
muhme - comment - 21 Apr 2026

I have tested this item πŸ”΄ unsuccessfully on 9769b06

Final test before merge with JBT and installed fa-IR

  • Before PR
    • With en-GB and Gregorian calendar
      • Seen problem in backend for all five date/time-picker Publishing, Featured and Created fields
      • Seen problem in frontend for the two Publishing fields
    • With fa-IR and Jalali (Solar Hijri) calendar
      • Seen problem in backend e.g. in Start Publishing field
        • ⚠️ Another error: if the time is changed in the hour and minute fields, it is saved in the other field instead -> created #47645
  • Applied PR with Patch Tester and npm run build:js
    • βœ… With en-GB and Gregorian calendar
      • Backend for all five date/time-picker Publishing, Featured and Created fields are working now
        • Also working is only using date/time-picker or only entering date/time manually
        • Also working is clearing all fields, used is 'Start Punlishing' and 'Created Date' with current date/time
      • Frontend the two plublishing fields are working
        • Also working is only using date/time-picker or only entering date/time manually
    • βœ… With fa-IR and Jalali (Solar Hijri) calendar
      • Backend for all five date/time-picker Publishing, Featured and Created fields are working now
        • Also working is clearing all fields, used is 'Start Punlishing' and 'Created Date' with current date/time
        • The other error #47645 is still present
    • ❌ New error is found, changing hour and minute results in changing the year (e.g. from 2026 to 997)

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.
avatar cyrez
cyrez - comment - 21 Apr 2026

Thank you @muhme for this advanced test!
I missed the data-alt-value attribute...
I will come up with an improved update tomorrow adding a date convertion for non-gregorian to populate correctly the data-alt-value.

avatar cyrez cyrez - change - 22 Apr 2026
Labels Added: RTC
avatar cyrez
cyrez - comment - 22 Apr 2026

@muhme @exlemor @brianteeman @richard67 @krishnagandhicode, after Heiko advanced test, an issue was found with datetime stored, not converted to Gregorian SQL format in Jahali calendar.

I've updated the PR to fix that, adding a correct conversion for date.

In the same time, Heiko reported a RTL issue for hour and minute selector #47645 which is not related to this PR, but as i was digging into the code, i've fixed it as well.
The issue is hour and minutes fields were swapped byt line 718 row.insertBefore(minutesCell, hoursCell); in RTL, but when getting the field values, the hour was getting minutes field and vice-versa for the minutes field getting the hour. To fix it, added additionnal check for RTL to reverse hour and minutes childnodes.

So that means this PR will need 3 test contexts:

  • In gregorian LTR (primary test process of this PR)
  • In RTL (gregorian or not) Note: as @brianteeman mentionned: "the hours:minutes should be displayed exactly the same in both LTR and RTL"
  • In Jahali calendar (the date and time should be stored in DB in Gregorian format, but rendered in Jahali calendar in the datetime picker and input field)

I've done many test since yesterday since with this updated PR (LTR, RTL, Gregorian, Jahali) and it seems to fix the 2+1 issues reported).

Thank you for testing back this PR! πŸ‘

avatar cyrez cyrez - change - 22 Apr 2026
The description was changed
avatar cyrez cyrez - edited - 22 Apr 2026
avatar muhme muhme - change - 22 Apr 2026
Status Ready to Commit ⇒ Pending
avatar muhme
muhme - comment - 22 Apr 2026

Set back to Pending, as code is changed and new tests are required


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar muhme
muhme - comment - 22 Apr 2026

Set back to Pending, as code is changed and new tests are required


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar cyrez
cyrez - comment - 22 Apr 2026

Thanks @muhme πŸ‘

avatar brianteeman
brianteeman - comment - 22 Apr 2026

The test instructions are wrong. There is a difference between testing and RTL language such as Hebrew or Arabic and testing with Persian (farsi). Hebrew and Arabic both use the Gregorian calendar but Persian uses the very different jalali calendar. Please don't confuse the two.

I am surprised to hear that there is a problem with time on the jalali calendar as this was tested by native speakers. Unfortunately they are unable to retest at the moment as internet access is not currently available in their country.

avatar cyrez
cyrez - comment - 22 Apr 2026

The test instructions are wrong. There is a difference between testing and RTL language such as Hebrew or Arabic and testing with Persian (farsi). Hebrew and Arabic both use the Gregorian calendar but Persian uses the very different jalali calendar. Please don't confuse the two.

Thanks Brian, but maybe my English is not perfect. I would be happy if you can help me to improve testing instruction.
I've mentionned "Jahali" for RTL with a eg. before (i think it means example in English, if not, i'm doing this error since a long tiem...), as the issue reported by @muhme is with Jahali calendar.
Of course, i can edit to improve the instruction to add mention of Gregorian calendar with RTL language.

I am surprised to hear that there is a problem with time on the jalali calendar as this was tested by native speakers. Unfortunately they are unable to retest at the moment as internet access is not currently available in their country.
I'm surprised too after @muhme issue report #47645 about RTL issue with Jahali (which is not only for Jahali, but for RTL languages) to not have been catched earlier, as mixing hours and minutes seems a confusing behavior.

But with advanced and thorough testing of this PR, we could potentially fix all of this. ;-)

avatar cyrez
cyrez - comment - 22 Apr 2026

The test instructions are wrong. There is a difference between testing and RTL language such as Hebrew or Arabic and testing with Persian (farsi). Hebrew and Arabic both use the Gregorian calendar but Persian uses the very different jalali calendar. Please don't confuse the two.

Thanks Brian, but maybe my English is not perfect. I would be happy if you can help me to improve testing instruction.
I've mentionned "Jahali" for RTL with a eg. before (i think it means example in English, if not, i'm doing this error since a long tiem...), as the issue reported by @muhme is with Jahali calendar.
Of course, i can edit to improve the instruction to add mention of Gregorian calendar with RTL language.

I am surprised to hear that there is a problem with time on the jalali calendar as this was tested by native speakers. Unfortunately they are unable to retest at the moment as internet access is not currently available in their country.

I'm surprised too after @muhme issue report #47645 about RTL issue with Jahali (which is not only for Jahali, but for RTL languages) to not have been catched earlier, as mixing hours and minutes seems a confusing behavior.

But with advanced and thorough testing of this PR, we could potentially fix all of this. ;-)

avatar cyrez
cyrez - comment - 22 Apr 2026

The test instructions are wrong. There is a difference between testing and RTL language such as Hebrew or Arabic and testing with Persian (farsi). Hebrew and Arabic both use the Gregorian calendar but Persian uses the very different jalali calendar. Please don't confuse the two.

Thanks Brian, but maybe my English is not perfect. I would be happy if you can help me to improve testing instruction.
I've mentionned "Jahali" for RTL with a eg. before (i think it means example in English, if not, i'm doing this error since a long tiem...), as the issue reported by @muhme is with Jahali calendar.
Of course, i can edit to improve the instruction to add mention of Gregorian calendar with RTL language.

I am surprised to hear that there is a problem with time on the jalali calendar as this was tested by native speakers. Unfortunately they are unable to retest at the moment as internet access is not currently available in their country.

I'm surprised too after @muhme issue report #47645 about RTL issue with Jahali (which is not only for Jahali, but for RTL languages) to not have been catched earlier, as mixing hours and minutes is a confusing behavior.

But with advanced and thorough testing of this PR, we could potentially fix all of this. ;-)

avatar cyrez
cyrez - comment - 22 Apr 2026

The test instructions are wrong. There is a difference between testing and RTL language such as Hebrew or Arabic and testing with Persian (farsi). Hebrew and Arabic both use the Gregorian calendar but Persian uses the very different jalali calendar. Please don't confuse the two.

Thanks @brianteeman, maybe my English is not perfect. I would be happy if you can help me to improve testing instruction.
I've mentionned "Jahali" for RTL with a eg. before (i think it means example in English, if not, i'm doing this error since a long tiem...), as the issue reported by @muhme is with Jahali calendar.
Of course, i can edit to improve the instruction to add mention of Gregorian calendar with RTL language.

I am surprised to hear that there is a problem with time on the jalali calendar as this was tested by native speakers. Unfortunately they are unable to retest at the moment as internet access is not currently available in their country.

I'm surprised too after @muhme issue report #47645 about RTL issue with Jahali (which is not only for Jahali, but for RTL languages) to not have been catched earlier, as mixing hours and minutes is a confusing behavior.

But with advanced and thorough testing of this PR, we could potentially fix all of this. ;-)

avatar cyrez
cyrez - comment - 22 Apr 2026

The test instructions are wrong. There is a difference between testing and RTL language such as Hebrew or Arabic and testing with Persian (farsi). Hebrew and Arabic both use the Gregorian calendar but Persian uses the very different jalali calendar. Please don't confuse the two.

Thanks @brianteeman, maybe my English is not perfect. I would be happy if you can help me to improve testing instruction.
I've mentionned "Jalali" for RTL with a eg. before (i think it means example in English, if not, i'm doing this error since a long tiem...), as the issue reported by @muhme is with Jalali calendar.
Of course, i can edit to improve the instruction to add mention of Gregorian calendar with RTL language.

I am surprised to hear that there is a problem with time on the jalali calendar as this was tested by native speakers. Unfortunately they are unable to retest at the moment as internet access is not currently available in their country.

I'm surprised too after @muhme issue report #47645 about RTL issue with Jalali (which is not only for Jalali, but for RTL languages) to not have been catched earlier, as mixing hours and minutes is a confusing behavior.

But with advanced and thorough testing of this PR, we could potentially fix all of this. ;-)

avatar cyrez
cyrez - comment - 22 Apr 2026

The test instructions are wrong. There is a difference between testing and RTL language such as Hebrew or Arabic and testing with Persian (farsi). Hebrew and Arabic both use the Gregorian calendar but Persian uses the very different jalali calendar. Please don't confuse the two.

Thanks @brianteeman, maybe my English is not perfect. I would be happy if you can help me to improve testing instruction.
I've mentionned "Jalali" for RTL with a eg. before (i think it means example in English, if not, i'm doing this error since a long time...), as the issue reported by @muhme is with Jalali calendar.
Of course, i can edit to improve the instruction to add mention of Gregorian calendar with RTL language.

I am surprised to hear that there is a problem with time on the jalali calendar as this was tested by native speakers. Unfortunately they are unable to retest at the moment as internet access is not currently available in their country.

I'm surprised too after @muhme issue report #47645 about RTL issue with Jalali (which is not only for Jalali, but for RTL languages) to not have been catched earlier, as mixing hours and minutes is a confusing behavior.

But with advanced and thorough testing of this PR, we could potentially fix all of this. ;-)

avatar cyrez cyrez - change - 22 Apr 2026
The description was changed
avatar cyrez cyrez - edited - 22 Apr 2026
avatar cyrez
cyrez - comment - 22 Apr 2026

I've updated the testing instructions to prevent confusion.

avatar brianteeman brianteeman - test_item - 23 Apr 2026 - Tested successfully
avatar brianteeman
brianteeman - comment - 23 Apr 2026

I have tested this item βœ… successfully on 521376d

verified the bug in arabic and farsi
confirmed this pr fixes the bug in both arabic and farsi


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar brianteeman
brianteeman - comment - 23 Apr 2026

I have tested this item βœ… successfully on 521376d

verified the bug in arabic and farsi
confirmed this pr fixes the bug in both arabic and farsi


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar krishnagandhicode
krishnagandhicode - comment - 27 Apr 2026

Thanks a lot @cyrez for fixing the reported issues.

I was able to all the situations successfully - So this PR does what it says.

But unfortunately ;( there's a small issue I noticed that HAPPENS ONLY AFTER APPLYING THE PATCH.

while using Persian Language for Admin and selecting a date a date in date picker it also highlights it's adjacent date in calendar : see Screen Recording.

Recording.2026-04-27.221616.mp4
avatar krishnagandhicode
krishnagandhicode - comment - 27 Apr 2026

Thanks a lot @cyrez for fixing the reported issues.

I was able to test all the situations successfully - So this PR does what it says.

But unfortunately ;( there's a small issue I noticed that HAPPENS ONLY AFTER APPLYING THE PATCH.

while using Persian Language for Admin and selecting a date a date in date picker it also highlights it's adjacent date in calendar : see Screen Recording.

Recording.2026-04-27.221616.mp4
avatar krishnagandhicode
krishnagandhicode - comment - 27 Apr 2026

Thanks a lot @cyrez for fixing the reported issues.

I was able to test all the situations successfully - So this PR does what it says.

But unfortunately ;( there's a small issue I noticed that HAPPENS ONLY AFTER APPLYING THE PATCH.

while using Persian Language for Admin and selecting a date in date picker it also highlights it's adjacent date in calendar : see Screen Recording.

Recording.2026-04-27.221616.mp4
avatar cyrez
cyrez - comment - 4 May 2026

Thanks a lot @cyrez for fixing the reported issues.

I was able to test all the situations successfully - So this PR does what it says.

But unfortunately ;( there's a small issue I noticed that HAPPENS ONLY AFTER APPLYING THE PATCH.

while using Persian Language for Admin and selecting a date in date picker it also highlights it's adjacent date in calendar : see Screen Recording.
Recording.2026-04-27.221616.mp4

Hi @krishnagandhicode , i'm not able to reproduce your strange issue.
Could you turn on your browser javascript console to check if any script errors on the page?

Can someone else test with Persian language and check if same issue or not as the one reported in the video?

avatar muhme
muhme - comment - 12 May 2026

Yes, I can confirm @krishnagandhicode finding, using Chrome browser. See https://github.com/user-attachments/assets/9aa7e402-a9f7-4db9-928c-477606366583

  • Selecting 'Ϋ±Ϋ²' and selecting 'Ϋ±Ϋ±' is working
  • But selecting 'Ϋ±Ϋ°' results in 'ΫΉ' and selecting 'ΫΉ' results in 'ΫΈ'.
avatar muhme
muhme - comment - 12 May 2026

Yes, I can confirm @krishnagandhicode finding, using Chrome browser. See https://github.com/user-attachments/assets/9aa7e402-a9f7-4db9-928c-477606366583

  • Selecting 'Ϋ±Ϋ²' and selecting 'Ϋ±Ϋ±' is working
  • But selecting 'Ϋ±Ϋ°' results in 'ΫΉ' and selecting 'ΫΉ' results in 'ΫΈ'.

Before PR selecting one day is working and results in the selected day.

avatar brianteeman
brianteeman - comment - 12 May 2026

@mortezahonar can you take a look please

avatar mortezahonar
mortezahonar - comment - 13 May 2026

Version 5.4.4-dev installed

In English (Date & Time):

  • Selecting hour and minute works correctly
  • Typing hour and minute also applies to the calendar field
  • This test was performed on all 5 date fields

Next step:
Persian language pack version 5.4.2v1 was installed and set as the backend language.

In the following path:
\media\system\js\fields

The contents of two files:

  • calendar.js
  • calendar.min.js

were replaced with the files from this PR.

All tests for 5 date/time fields were successful , which is greatly appreciated.

The only issue relates to going back to a date before the 11th day of the second month:

  • When navigating backward with the mouse, it does not go beyond the 11th day of the second month.
  • When navigating backward with the keyboard, you can reach any day of the first month, but upon saving, the second month is restored again.
  • In other words, any day can be selected, but selecting the first month is not possible.

No issues were observed when selecting subsequent months.

avatar mortezahonar
mortezahonar - comment - 13 May 2026

Version 5.4.4-dev installed

In English (Date & Time):

  • Selecting hour and minute works correctly
  • Typing hour and minute also applies to the calendar field
  • This test was performed on all 5 date fields

Next step:
Persian language pack version 5.4.2v1 was installed and set as the backend language.

In the following path:
\media\system\js\fields

The contents of two files:

  • calendar.js
  • calendar.min.js

were replaced with the files from this PR.

All tests for 5 date/time fields were successful , which is greatly appreciated.

The only issue relates to going back to a date before the 11th day of the second month:

  • When navigating backward with the mouse, it does not go beyond the 11th day of the second month.
  • When navigating backward with the keyboard, you can reach any day of the first month, but upon saving, the second month is restored again.
  • In other words, any day can be selected, but selecting the first month is not possible.

No issues were observed when selecting subsequent months.

avatar mortezahonar
mortezahonar - comment - 13 May 2026

Version 5.4.4-dev installed

In English (Date & Time):

  • Selecting hour and minute works correctly
  • Typing hour and minute also applies to the calendar field
  • This test was performed on all 5 date fields

Next step:
Persian language pack version 5.4.2v1 was installed and set as the backend language.

In the following path:
\media\system\js\fields

The contents of two files:

  • calendar.js
  • calendar.min.js

were replaced with the files from this PR.

All tests for 5 date/time fields were successful , which is greatly appreciated.


The only issue relates to going back to a date before the 11th day of the second month:

  • When navigating backward with the mouse, it does not go beyond the 11th day of the second month.

  • When navigating backward with the keyboard, you can reach any day of the first month, but upon saving, the second month is restored again.

  • In other words, any day can be selected, but selecting the first month is not possible.


No issues were observed when selecting subsequent months.

avatar mortezahonar
mortezahonar - comment - 13 May 2026

Version 5.4.4-dev installed

In English (Date & Time):

  • Selecting hour and minute works correctly
  • Typing hour and minute also applies to the calendar field
  • This test was performed on all 5 date fields

Next step:
Persian language pack version 5.4.2v1 was installed and set as the backend language.

In the following path:
\media\system\js\fields

The contents of two files:

  • calendar.js
  • calendar.min.js

were replaced with the files from this PR.

All tests for 5 date/time fields were successful , which is greatly appreciated.


The only issue relates to going back to a date before the 11th day of the second month:

  • When navigating backward with the mouse, it does not go beyond the 11th day of the second month.

  • When navigating backward with the keyboard, you can reach any day of the first month, but upon saving, the second month is restored again.

  • In other words, any day can be selected, but selecting the first month is not possible.

This issue was not observed when the language was English.

No issues were observed when selecting subsequent months.

I hope my testing method is correct.

avatar mortezahonar
mortezahonar - comment - 13 May 2026

Version 5.4.4-dev installed

In English (Date & Time):

  • Selecting hour and minute works correctly
  • Typing hour and minute also applies to the calendar field
  • This test was performed on all 5 date fields

Next step:
Persian language pack version 5.4.2v1 was installed and set as the backend language.

In the following path:
\media\system\js\fields

The contents of two files:

  • calendar.js
  • calendar.min.js

were replaced with the files from this PR.

All tests for 5 date/time fields were successful , which is greatly appreciated.


The only issue relates to going back to a date before the 11th day of the second month:

  • When navigating backward with the mouse, it does not go beyond the 11th day of the second month.

  • When navigating backward with the keyboard, you can reach any day of the first month, but upon saving, the second month is restored again.

  • In other words, any day can be selected, but selecting the first month is not possible.

This issue was not observed when the language was English.


No issues were observed when selecting subsequent months.

I hope my testing method is correct.

avatar mortezahonar
mortezahonar - comment - 13 May 2026

Joomla Version 5.4.4-dev installed

In English (Date & Time):

  • Selecting hour and minute works correctly
  • Typing hour and minute also applies to the calendar field
  • This test was performed on all 5 date fields

Next step:
Persian language pack version 5.4.2v1 was installed and set as the backend language.

In the following path:
\media\system\js\fields

The contents of two files:

  • calendar.js
  • calendar.min.js

were replaced with the files from this PR.

All tests for 5 date/time fields were successful , which is greatly appreciated.


The only issue relates to going back to a date before the 11th day of the second month:

  • When navigating backward with the mouse, it does not go beyond the 11th day of the second month.

  • When navigating backward with the keyboard, you can reach any day of the first month, but upon saving, the second month is restored again.

  • In other words, any day can be selected, but selecting the first month is not possible.

This issue was not observed when the language was English.


No issues were observed when selecting subsequent months.

I hope my testing method is correct.

avatar mortezahonar
mortezahonar - comment - 14 May 2026

In the date field, when we type 01 for the month, after saving, 02 is displayed.

The only issue relates to going back to a date before the 11th day of the second month:

  • When navigating backward with the mouse, it does not go beyond the 11th day of the second month.
  • When navigating backward with the keyboard, you can reach any day of the first month, but upon saving, the second month is restored again.
  • In other words, any day can be selected, but selecting the first month is not possible.

This issue was not observed when the language was English.

No issues were observed when selecting subsequent months.

Should I open a new issue for this?
Or does this issue belong within this PR?

avatar krishnagandhicode
krishnagandhicode - comment - 14 May 2026

Should I open a new issue for this? Or does this issue belong within this PR?

@mortezahonar IF you can reproduce the issue (you reported) WITHOUT applying the patch(code changes) from this PR - then YES Create a new issue.

avatar mortezahonar
mortezahonar - comment - 14 May 2026

With this patch:

It is not possible to select the first month using the mouse.

Using the keyboard (arrow keys) on the calendar, you can go back to the first month, but after selecting any day from the first month (the one we reached with the keyboard) and saving, it does not apply, and the second month will appear in the date field.

Without this patch:

You can select the first month and save successfully.

avatar mortezahonar
mortezahonar - comment - 14 May 2026

With this patch:

It is not possible to select the first month using the mouse.

Using the keyboard (arrow keys) on the calendar, you can go back to the first month, but after selecting any day from the first month (the one we reached with the keyboard) and saving, it does not apply, and the second month will appear in the date field.

Without this patch:

It is possible to select the first month and save it.

avatar cyrez cyrez - change - 16 May 2026
Labels Removed: RTC
avatar cyrez
cyrez - comment - 16 May 2026

Thanks @mortezahonar for your testing, i was then able to reproduce and understand the issue @krishnagandhicode reported: related to change month.

There was a conflict with 'change' event handler on Jalali, and i changed it to 'blur'.

On my test in Persian, both issue of double select on first month reported by @krishnagandhicode (and confirmed by @muhme ) and issue to navigate in months reported by @mortezahonar seems to be fixed with the blur event.

On Gregorian calendar, works as before this last change.

So, this PR would need a reset of testing, and to test back in gregorian and non-gregorian, and as well with LTR and RTL languages.

Thank you @ALL for your detailed test and reports, helping to improve it! πŸ‘

avatar mortezahonar
mortezahonar - comment - 16 May 2026

If we change the date to the first month and set one of the hour or minute fields, then check again whether the month has reverted to the second month; if it has changed to the second month, we change it back to the first month (after selecting the hour or minute) it is applied, and the first month is replaced with the selected day.

But if we try to change it again, the second month is selected by default.

In this case, even if we change to the first month, the second month is still saved unless we fill in the hour or minute and check whether it jumped to the second month; if it did, we revert it to the first month. This way, it is saved with the first month.

avatar cyrez
cyrez - comment - 13 Jun 2026

@mortezahonar, i've just updated the PR, and it seems to me that the issue with Jalali calendar is fixed.
If you could test the new updated PR? Thank you!!

avatar mortezahonar
mortezahonar - comment - 13 Jun 2026

Excellent. Tested with the mouse and it works correctly.

But the issue still persists with the keyboard. When entering the date with the keyboard in the calendar input, the same problem occurs.

For example, when typing (copy-paste):
1405-01-13 10:03:00
yyyy-mm-dd hh:mm:ss

Here, 13 represents the day, and 01 represents the first month.

After saving:
Ϋ±Ϋ΄Ϋ°Ϋ΅-Ϋ°Ϋ²-Ϋ±Ϋ² Ϋ±Ϋ°:Ϋ°Ϋ³:Ϋ°Ϋ°
is replaced, which is
1405-02-12 10:03:00

1405 (or Ϋ±Ϋ΄Ϋ°Ϋ΅) represents the year, which we haven't touched.

In other words, when typing with the keyboard, the first month 01 is converted to 02, the second month.

But I reiterate, it works correctly with the mouse.

avatar mortezahonar
mortezahonar - comment - 13 Jun 2026

Excellent. Tested with the mouse and it works correctly.

But the issue still persists with the keyboard. When entering the date with the keyboard in the calendar input, the same problem occurs.

For example, when typing (copy-paste):
1405-01-13 10:03:00
yyyy-mm-dd hh:mm:ss

Here, 13 represents the day, and 01 represents the first month.

After saving:
Ϋ±Ϋ΄Ϋ°Ϋ΅-Ϋ°Ϋ²-Ϋ±Ϋ² Ϋ±Ϋ°:Ϋ°Ϋ³:Ϋ°Ϋ°
is replaced, which is
1405-02-12 10:03:00

1405 (or Ϋ±Ϋ΄Ϋ°Ϋ΅) represents the year, which we haven't touched.

In other words, when typing with the keyboard, the first month 01 is converted to 02, the second month.

But I reiterate, it works correctly with the mouse.

avatar cyrez
cyrez - comment - 13 Jun 2026

@mortezahonar, thanks for your test.

You mean issue when copy/paste of a datetime, but if you enter the date in manual directly in input, do you have the same issue? (with no copy/paste)

avatar mortezahonar
mortezahonar - comment - 13 Jun 2026

What I mean is that this issue occurs when both of the following conditions happen together:

  1. Exactly when we type the date directly and manually into the date input field using the keyboard, or copy-paste it.

  2. But my emphasis is that the month in the date we type must be the first month (01) for this issue to be reproduced.

That is, in the format:
yyyy-mm-dd hh:mm:ss
only the month should be 01:
yyyy-01-dd hh:mm:ss

For example, you can use the example:
1405-01-13 10:03:00

In this example, the month is 01. You can either type it directly and manually, or copy-paste it, it makes no difference.

After saving, instead of:
yyyy-01-dd hh:mm:ss
it becomes:
yyyy-02-dd hh:mm:ss
Meaning the first month is converted to the second month. In Persian, 02 is written as Ϋ°Ϋ².

Previously, this same issue also existed with the mouse, which you kindly fixed.

avatar joomla-cms-bot joomla-cms-bot - change - 19 Jul 2026
Category JavaScript Repository NPM Change ⇒ JavaScript Language & Strings Repository NPM Change
avatar cyrez cyrez - change - 19 Jul 2026
Labels Added: Language Change
avatar cyrez cyrez - change - 19 Jul 2026
The description was changed
avatar cyrez cyrez - edited - 19 Jul 2026
avatar cyrez
cyrez - comment - 19 Jul 2026

Hello,

This PR is finally ready for testing again, with fixes for issues encountered with the Jalali calendar and some incidental improvements.

Fixes for Jalali date switch issue:

  • Adding a strict parsing: while the user is still typing, the string is necessarily incomplete for most keystrokes. Without "strict", Date.parseFieldDate() silently falls back to "today" (a real Gregorian date), which would then be wrongly re-interpreted as a Jalali date below and converted into a nonsensical date (e.g. year ~2647). So we bail out until we have a genuinely complete, valid date, leaving data-alt-value untouched.
  • Date.localCalToGregorian() (JalaliDate.jalaliToGregorian) expects a 1-indexed month, while date.getMonth() is 0-indexed (native JS). Symmetrically, its returned month is 1-indexed, while setMonth() expects 0-indexed. Forgetting either conversion causes an off-by-one day (or month) error.

Improvement made in this latest update to this PR:

  • When the date picker is open, it now updates when the input field is manually modified.

Thank you all for testing again!

avatar mortezahonar mortezahonar - test_item - 20 Jul 2026 - Tested successfully
avatar mortezahonar
mortezahonar - comment - 20 Jul 2026

I have tested this item βœ… successfully on f43e8dd


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar mortezahonar
mortezahonar - comment - 20 Jul 2026

I have tested this item βœ… successfully on f43e8dd


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar mortezahonar mortezahonar - test_item - 20 Jul 2026 - Not tested
avatar mortezahonar
mortezahonar - comment - 20 Jul 2026

I have not tested this item.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar mortezahonar
mortezahonar - comment - 20 Jul 2026

I have not tested this item.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar mortezahonar mortezahonar - test_item - 20 Jul 2026 - Tested successfully
avatar mortezahonar
mortezahonar - comment - 20 Jul 2026

I have tested this item βœ… successfully on f43e8dd


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar mortezahonar
mortezahonar - comment - 20 Jul 2026

I have tested this item βœ… successfully on f43e8dd


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar mortezahonar mortezahonar - test_item - 20 Jul 2026 - Not tested
avatar mortezahonar
mortezahonar - comment - 20 Jul 2026

I have not tested this item.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar mortezahonar
mortezahonar - comment - 20 Jul 2026

I have not tested this item.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar richard67
richard67 - comment - 20 Jul 2026

@mortezahonar I am confused. You submitt a successful test result, then you revert that by submitting β€žnot testedβ€œ, then again a successful test result and then again β€žnot testedβ€œ. What are you trying to do?

avatar mortezahonar
mortezahonar - comment - 20 Jul 2026

I apologize.

In the initial test, everything seemed to be correct.
So I marked the test as successful.

Later I realized that in
yyyy-mm-dd
when we set
yyyy-01-31
it converts to the date
yyyy-02-30. In other words, the first month jumps to the second month again.
For this reason, I reverted the test.

On the other hand, without this PR
in the Persian calendar, the positions of the hour and minute fields still get swapped, and the conversion problem from the first month to the second also exists.

I was concerned that perhaps there was no more room for improvement, so I discussed it with Cyril and reverted the test again.

The calendar has had some weaknesses for a long time, and I was worried that it might not be fixable.

I apologize again.

avatar cyrez
cyrez - comment - 21 Jul 2026

@richard67 yes, we are in discussion with @mortezahonar to do extended tests and improvements for this PR.
Quite many issues with Jalali, and it took me time to understand better the logic behind this calendar, and thanks to help from @mortezahonar i think we are closed to a working calendar picker in Jalali as well as improvements for Gregorian as well ;-)

@mortezahonar just updated the PR with a fix for the 31 to 30 of next month switch. To help me find out why this last issue (as others are fixed), i've asked help to Claude (well, i didn't use AI for such search before, but its help was useful to understand what was going wrong with Jalali, and was good to explain the intricacies of the Jalali calendar).

To fix it, it needs to create custom properties (named here rawYear, rawMonth, rawDay) for Date.parseFieldDate function and not use native JS getFullYear()/getMonth()/getDate() as they return only a gregorian value.

Now, it may be ok with YYYY-01-31 date.

Another issue i've found yesterday: with jalali calendar, when opening calendar picker and closing it without modifying the date nor time, on item save, the date was stored in Jalali format. Fixed as well.

So, open to new tests!

Thank you for your patience! (not easy to fix the Jalali calendar)

avatar cyrez
cyrez - comment - 21 Jul 2026

@richard67 yes, we are in discussion with @mortezahonar to do extended tests and improvements for this PR.
Quite many issues with Jalali, and it took me time to understand better the logic behind this calendar, and thanks to help from @mortezahonar i think we are closed to a working calendar picker in Jalali as well as improvements for Gregorian as well ;-)

@mortezahonar just updated the PR with a fix for the 31 to 30 of next month switch. To help me find out why this last issue (others reported are now fixed), i've asked help to Claude (well, i didn't use AI for such search before, but its help was useful to understand what was going wrong with Jalali, and was good to explain the intricacies of the Jalali calendar).

To fix it, it needs to create custom properties (named here rawYear, rawMonth, rawDay) for Date.parseFieldDate function and not use native JS getFullYear()/getMonth()/getDate() as they return only a gregorian value.

Now, it may be ok with YYYY-01-31 date.

Another issue i've found yesterday: with jalali calendar, when opening calendar picker and closing it without modifying the date nor time, on item save, the date was stored in Jalali format. Fixed as well.

So, open to new tests!

Thank you for your patience! (not easy to fix the Jalali calendar)

avatar cyrez
cyrez - comment - 21 Jul 2026

@richard67 yes, we are in discussion with @mortezahonar to do extended tests and improvements for this PR.
Quite many issues with Jalali, and it took me time to understand better the logic behind this calendar, and thanks to help from @mortezahonar i think we are closed to a working calendar picker in Jalali as well as improvements for Gregorian as well ;-)

@mortezahonar just updated the PR with a fix for the 31 to 30 of next month switch. To help me find out why this last issue (others reported are now fixed), i've asked help to Claude (well, i didn't use AI for such search before, but its help was useful to understand what was going wrong with Jalali, and it was good to explain the intricacies of the Jalali calendar).

To fix it, it needs to create custom properties (named here rawYear, rawMonth, rawDay) for Date.parseFieldDate function and not use native JS getFullYear()/getMonth()/getDate() as they return only a gregorian value.

Now, it may be ok with YYYY-01-31 date.

Another issue i've found yesterday: with jalali calendar, when opening calendar picker and closing it without modifying the date nor time, on item save, the date was stored in Jalali format. Fixed as well.

So, open to new tests!

Thank you for your patience! (not easy to fix the Jalali calendar)

avatar cyrez
cyrez - comment - 21 Jul 2026

@richard67 yes, we are in discussion with @mortezahonar to do extended tests and improvements for this PR.
Quite many issues with Jalali, and it took me time to understand better the logic behind this calendar, and thanks to help from @mortezahonar i think we are closed to a working calendar picker in Jalali as well as improvements for Gregorian as well ;-)

@mortezahonar just updated the PR with a fix for the 31 to 30 of next month switch. To help me find out why this last issue (others reported are now fixed), i've asked help to Claude (well, i didn't use AI for such search before, but its help was useful to understand what was going wrong with Jalali, and it was good to explain the intricacies of the Jalali calendar).

To fix it, i needed to create custom properties (named here rawYear, rawMonth, rawDay) for Date.parseFieldDate function and not use native JS getFullYear()/getMonth()/getDate() as they return only a gregorian value.

Now, it may be ok with YYYY-01-31 date.

Another issue i've found yesterday: with jalali calendar, when opening calendar picker and closing it without modifying the date nor time, on item save, the date was stored in Jalali format. Fixed as well.

So, open to new tests!

Thank you for your patience! (not easy to fix the Jalali calendar)

avatar cyrez
cyrez - comment - 21 Jul 2026

@richard67 yes, we are in discussion with @mortezahonar to do extended tests and improvements for this PR.
Quite many issues with Jalali, and it took me time to understand better the logic behind this calendar, and thanks to help from @mortezahonar i think we are closed to a working calendar picker in Jalali as well as improvements for Gregorian as well ;-)

@mortezahonar just updated the PR with a fix for the 31 to 30 of next month switch. To help me find out why this last issue (others reported are now fixed), i've asked help to Claude (well, i didn't use AI for such search before, but its help was useful to understand what was going wrong with Jalali, and it was good to explain the intricacies of the Jalali calendar).

To fix it, i needed to create custom properties (named here rawYear, rawMonth, rawDay) for Date.parseFieldDate function and not use native JS getFullYear()/getMonth()/getDate() as they return only a gregorian value.
This way, we receive in the calendar.js the correct date conversion from the Jalali date-helper.js

Now, it may be ok with YYYY-01-31 date.

Another issue i've found yesterday: with jalali calendar, when opening calendar picker and closing it without modifying the date nor time, on item save, the date was stored in Jalali format. Fixed as well.

So, open to new tests!

Thank you for your patience! (not easy to fix the Jalali calendar)

avatar cyrez cyrez - change - 21 Jul 2026
Title
…
[5.4] Implement date and time validation on input change
[5.4] Implement date and time validation on input change (and more)
avatar cyrez cyrez - edited - 21 Jul 2026
avatar mortezahonar mortezahonar - test_item - 23 Jul 2026 - Tested successfully
avatar mortezahonar
mortezahonar - comment - 23 Jul 2026

I have tested this item βœ… successfully on 8231029

The error of shifting by one day has been fixed.
The error of converting the first solar month to the second month has been fixed.
The error in manual date entry has been completely fixed.
The error when pressing the close button has been fixed.
The date in leap year has no problem and is correct.

The date for the entire year was checked both with the mouse and with manual keyboard entry.

Thanks to everyone and special thanks to @cyrez .

This is one of the most pleasant events.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar mortezahonar
mortezahonar - comment - 23 Jul 2026

I have tested this item βœ… successfully on 8231029

The error of shifting by one day has been fixed.
The error of converting the first solar month to the second month has been fixed.
The error in manual date entry has been completely fixed.
The error when pressing the close button has been fixed.
The date in leap year has no problem and is correct.

The date for the entire year was checked both with the mouse and with manual keyboard entry.

Thanks to everyone and special thanks to @cyrez .

This is one of the most pleasant events.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar mortezahonar
mortezahonar - comment - 23 Jul 2026

Also, an overflow error has been fixed.

For months in the Solar Hijri calendar that have more days than the equivalent months in the Gregorian calendar, the date used to jump by up to 3 days.
This issue has also been resolved.

avatar sadjadii-sadjadii sadjadii-sadjadii - test_item - 24 Jul 2026 - Tested successfully
avatar sadjadii-sadjadii
sadjadii-sadjadii - comment - 24 Jul 2026
avatar sadjadii-sadjadii
sadjadii-sadjadii - comment - 24 Jul 2026
avatar alikon alikon - change - 24 Jul 2026
Status Pending ⇒ Ready to Commit
avatar alikon
alikon - comment - 24 Jul 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar alikon
alikon - comment - 24 Jul 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar skkh84 skkh84 - test_item - 24 Jul 2026 - Tested unsuccessfully
avatar skkh84
skkh84 - comment - 24 Jul 2026

I have tested this item πŸ”΄ unsuccessfully on 8231029


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar skkh84
skkh84 - comment - 24 Jul 2026

I have tested this item πŸ”΄ unsuccessfully on 8231029


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar muhme
muhme - comment - 24 Jul 2026

I have tested this item πŸ”΄ unsuccessfully

@skkh84 What exactly went wrong with the test?

avatar mortezahonar
mortezahonar - comment - 24 Jul 2026

@muhme
We are reviewing and reproducing it with @skkh84.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar mortezahonar
mortezahonar - comment - 24 Jul 2026

@muhme
We are reviewing and reproducing it with @skkh84.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar cyrez
cyrez - comment - 24 Jul 2026

@muhme We are reviewing and reproducing it with @skkh84.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

Thanks for testing. There's important changes and improvements to make it full working with Jalali, so thanks to keep me informed of what issue is there, and how to reproduce it so that i could check it asap ;-)

avatar cyrez
cyrez - comment - 24 Jul 2026

@muhme We are reviewing and reproducing it with @skkh84.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

Thanks for testing. There's important changes and improvements to make it full working with Jalali, so thanks to keep me informed of what issue is still there, and how to reproduce it so that i could check it asap ;-)

avatar cyrez
cyrez - comment - 24 Jul 2026

@muhme We are reviewing and reproducing it with @skkh84.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

Thanks for testing. There's important changes and improvements to make it full working with Jalali, so thanks to keep me informed of what issue is still there, and how to reproduce it so that i could check it asap ;-)

Note: gregorian calendar test are required as well. To be sure Jalali fixes don't affect gregorian calendar picker. RTL/LTR to be check as well.

avatar skkh84 skkh84 - test_item - 24 Jul 2026 - Tested successfully
avatar skkh84
skkh84 - comment - 24 Jul 2026

I have tested this item βœ… successfully on 8231029


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar skkh84
skkh84 - comment - 24 Jul 2026

I have tested this item βœ… successfully on 8231029


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar mortezahonar
mortezahonar - comment - 24 Jul 2026

The test was performed for both Jalali and Gregorian dates.

No problems were observed.

calendar-fa-IR calendar-en-GB
avatar richard67
richard67 - comment - 25 Jul 2026

The test was performed for both Jalali and Gregorian dates.

No problems were observed.

@mortezahonar Does that refer to @skkh84 's test, or you have tested together? Or did you make a separate test independently from him? If the latter: Please mark your test result in the issue tracker, then we have 2 successful human tests.

avatar mortezahonar
mortezahonar - comment - 25 Jul 2026

I first tested separately and it was successful, and I marked the test result as successful.

After @skkh84 's test, which was probably unsuccessful due to cache or something else,

we tested again together on his system, and the result was successful, which was marked accordingly.

Once more, I separately tested the calendar-type field for both the Gregorian and Jalali calendars, and I have attached the screenshot.

Thanks.

avatar richard67 richard67 - change - 26 Jul 2026
Labels Added: RTC
avatar tecpromotion tecpromotion - test_item - 6 Aug 2026 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 6 Aug 2026

I have tested this item βœ… successfully on 723ba74


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar tecpromotion
tecpromotion - comment - 6 Aug 2026

I have tested this item βœ… successfully on 723ba74


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

avatar tecpromotion
tecpromotion - comment - 6 Aug 2026

I have tested this item βœ… successfully on 723ba74


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47626.

I have tested this item on 5.4-dev (npm ci && npm run build, Chrome), on the article Publishing tab (publish_up). All three linked issues are fixed. One small residual in the RTL time picker is noted below β€” it does not block the fix.

#46013 β€” manual edit not stored while picker open: with the picker open I typed 2026-03-15 10:30:00; data-alt-value updated, and after Save the DB #__content.publish_up held the manually typed value. Confirmed via onSubmit β†’ setAltValue() that the gregorian alt-value is what actually gets submitted. βœ…

#45933 β€” picker doesn't follow manual input: typing in the input with the picker open moved the day grid and the hour/minute selectors live to the typed date/time. βœ…

Strict parsing: an incomplete value (2026-07) no longer corrupts data-alt-value to a "today" fallback β€” it keeps the last valid value while typing and becomes 0000-00-00 00:00:00 on blur if still invalid. βœ…

#47645 β€” RTL hour/minute: forced dir=rtl. The time row is DOM-reordered in RTL ([title, minutes, hours, ampm]) and the fixed handlers now map correctly:

action (RTL) 24h 12h
change hour 09:15β†’07:15 βœ… 09:42β†’07:42 βœ…
change minute β†’42 βœ… β†’05 βœ…

Hour edits no longer land in the minute field and vice-versa. βœ…

Minor β€” RTL + 12-hour: the AM/PM selector still swaps hour⇄minute

The hour and minute change listeners get the RTL child-node swap, but the sibling AM/PM (.time-ampm) change listener (calendar.es5.js ~line 778, unchanged here) still reads childNodes[1]/[2], which are reversed by the same insertBefore(minutesCell, hoursCell). So in RTL + 12-hour mode, toggling AM/PM corrupts the time.

Reproduced: RTL, 12-hour field, 09:42 AM β†’ switch to PM β†’ 18:09:00 instead of 21:42:00 (hour/minute swapped). Hour/minute edits themselves are fine.

It's pre-existing and narrow (admin default is 24-hour, so it only affects a 12-hour format under an RTL language), but since this PR is exactly the RTL time-selector fix it's the natural place to finish it:

// AM/PM change handler β€” apply the same RTL swap as H/M
AP.addEventListener("change", function (event) {
    var c = event.target.parentNode.parentNode.childNodes;
    if (self.params.direction === 'rtl') {
        self.updateTime(c[2].childNodes[0].value, c[1].childNodes[0].value, c[3].childNodes[0].value);
    } else {
        self.updateTime(c[1].childNodes[0].value, c[2].childNodes[0].value, c[3].childNodes[0].value);
    }
}, false);
avatar richard67
richard67 - comment - 6 Aug 2026

Minor β€” RTL + 12-hour: the AM/PM selector still swaps hour⇄minute

The hour and minute change listeners get the RTL child-node swap, but the sibling AM/PM (.time-ampm) change listener (calendar.es5.js ~line 778, unchanged here) still reads childNodes[1]/[2], which are reversed by the same insertBefore(minutesCell, hoursCell). So in RTL + 12-hour mode, toggling AM/PM corrupts the time.

Reproduced: RTL, 12-hour field, 09:42 AM β†’ switch to PM β†’ 18:09:00 instead of 21:42:00 (hour/minute swapped). Hour/minute edits themselves are fine.

It's pre-existing and narrow (admin default is 24-hour, so it only affects a 12-hour format under an RTL language), but since this PR is exactly the RTL time-selector fix it's the natural place to finish it:

// AM/PM change handler β€” apply the same RTL swap as H/M
AP.addEventListener("change", function (event) {
    var c = event.target.parentNode.parentNode.childNodes;
    if (self.params.direction === 'rtl') {
        self.updateTime(c[2].childNodes[0].value, c[1].childNodes[0].value, c[3].childNodes[0].value);
    } else {
        self.updateTime(c[1].childNodes[0].value, c[2].childNodes[0].value, c[3].childNodes[0].value);
    }
}, false);

@cyrez Could you check and if ok implement @tecpromotion 's suggestion? Thanks in advance.

avatar richard67 richard67 - alter_testresult - 8 Aug 2026 - 47626: Tested successfully
avatar richard67
richard67 - comment - 8 Aug 2026

@cyrez Could you check and if ok implement @tecpromotion 's suggestion? Thanks in advance.

Because we will start to prepare the upcoming releases in the next days, we might also merge this PR as it is and make a new issue for the remaining 12h format problem so that can be fixed with a follow up PR.

avatar cyrez
cyrez - comment - 8 Aug 2026

Thank you @StefanSTS for your advanced testing!

Minor β€” RTL + 12-hour: the AM/PM selector still swaps hour⇄minute

The hour and minute change listeners get the RTL child-node swap, but the sibling AM/PM (.time-ampm) change listener (calendar.es5.js ~line 778, unchanged here) still reads childNodes[1]/[2], which are reversed by the same insertBefore(minutesCell, hoursCell). So in RTL + 12-hour mode, toggling AM/PM corrupts the time.

Reproduced: RTL, 12-hour field, 09:42 AM β†’ switch to PM β†’ 18:09:00 instead of 21:42:00 (hour/minute swapped). Hour/minute edits themselves are fine.

It's pre-existing and narrow (admin default is 24-hour, so it only affects a 12-hour format under an RTL language), but since this PR is exactly the RTL time-selector fix it's the natural place to finish it:

// AM/PM change handler β€” apply the same RTL swap as H/M
AP.addEventListener("change", function (event) {
    var c = event.target.parentNode.parentNode.childNodes;
    if (self.params.direction === 'rtl') {
        self.updateTime(c[2].childNodes[0].value, c[1].childNodes[0].value, c[3].childNodes[0].value);
    } else {
        self.updateTime(c[1].childNodes[0].value, c[2].childNodes[0].value, c[3].childNodes[0].value);
    }
}, false);

Good catch with the AM/PM time format in RTL direction. πŸ‘

I've added your fix (and tested it as well, confirm the issue before and the fix with the change).

Thank you all for your tests to help making the calendar picker more robust! (and Jalali ready).

Because we will start to prepare the upcoming releases in the next days, we might also merge this PR as it is and make a new issue for the remaining 12h format problem so that can be fixed with a follow up PR.

Just saw my email (vacation week), so thank you to inform me! This was a last minor quick fix thanks to @StefanSTS ;-)

avatar cyrez
cyrez - comment - 8 Aug 2026

@richard67 it seems i've got a copy/paste issue with tabulation...

avatar richard67 richard67 - change - 8 Aug 2026
The description was changed
avatar richard67 richard67 - edited - 8 Aug 2026
avatar StefanSTS
StefanSTS - comment - 8 Aug 2026

@cyrez, your thanks above was probably meant for @tecpromotion, not for @StefanSTS. :-)

avatar muhme
muhme - comment - 8 Aug 2026

βœ… Final test before merge with JBT and installed fa-IR

  • Before PR
    • With en-GB and Gregorian calendar
      • Seen manual time change inputs in backend for all five date/time-picker Publishing, Featured and Created fields are overwritten with actual time on save
      • Seen this problem in frontend for the two Publishing fields
    • With fa-IR and Jalali (Solar Hijri) calendar
      • Seen manual time change is overwritten in backend e.g. in Start Publishing field
      • Seen if the time is selected in the hour and minute fields, it is saved in the opposite field instead
  • Applied PR with gh pr checkout 47626 && npm run build:js
    • βœ… With en-GB and Gregorian calendar
      • Backend for all five date/time-picker Publishing, Featured and Created fields are working now
        • Also working is only using date/time-picker or only entering date/time manually
        • Also working is clearing all fields, used is 'Start Punlishing' and 'Created Date' with current date/time
      • Frontend the two plublishing and the thwo featured fields are working
        • Also working is only using date/time-picker or only entering date/time manually
    • βœ… With fa-IR and Jalali (Solar Hijri) calendar
      • Backend for all five date/time-picker Publishing, Featured and Created fields are working now
        • Also working is clearing all fields, used is 'Start Publishing' and 'Created Date' with current date/time
        • Picked minutes and hours are saved correctly
        • Selecting 'Ϋ±Ϋ²', 'Ϋ±Ϋ±', 'Ϋ±Ϋ°' and 'ΫΉ' is saved
avatar muhme muhme - change - 8 Aug 2026
Status Ready to Commit ⇒ Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 ⇒ 2026-08-08 16:55:13
Closed_By ⇒ muhme
avatar muhme muhme - close - 8 Aug 2026
avatar muhme muhme - merge - 8 Aug 2026
avatar muhme
muhme - comment - 8 Aug 2026

Thank you very much @cyrez for your contribution. Thank you @brianteeman for support. Thank you @tecpromotion for support and testing. Thanks to @exlemor, @krishnagandhicode, @mortezahonar, @skkh84 and @sadjadii-sadjadii for testing.

avatar cyrez
cyrez - comment - 10 Aug 2026

@cyrez, your thanks above was probably meant for @tecpromotion, not for @StefanSTS. :-)

Oh yes, sorry i selected the wrong "Stefan"... Yes, of course, thank you to @tecpromotion πŸ‘

Add a Comment

Login with GitHub to post a comment