RTC NPM Resource Changed bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar cyrez
cyrez
18 Apr 2026

EDIT 2026-04-22: Added fix for RTL

  • Added event listener to validate date and time input.
  • Fix RTL Hour and Minutes selectors in calendar picker.

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.

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. 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).

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)

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.

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

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.

Add a Comment

Login with GitHub to post a comment