Datepicker Localization Bug: Arabic Months Short Names Displayed as Numbers
I am experiencing an issue with the jQuery datepicker when the localization is set to "ar" (Arabic). Instead of showing the short names for the months, the datepicker displays them as numbers (1, 2, 3, etc.).
Steps to Reproduce:
- Initialize the jQuery datepicker with the following settings: javascript $('#datepicker').datepicker({ dateFormat: 'mm/dd/yy', changeMonth: true, changeYear: true, regional: 'ar' // Arabic localization });
- Open the datepicker.
- Observe the month short names displayed.
Expected Behavior: The month short names should be displayed as:
- ين (Jan)
- فب (Feb)
- مار (Mar)
- إب (Apr)
- ماي (May)
- يون (Jun)
- يول (Jul)
- أغس (Aug)
- سب (Sep)
- أكت (Oct)
- نوف (Nov)
- ديس (Dec)
Actual Behavior: The month short names are displayed as numbers (1, 2, 3, ...).
Thanks for the report. Does the issue you describe exist when jQuery UI 1.12.1 is used or only with jQuery UI 1.13.0 or newer?
@mgol the issue occurs when using jQueryUI 1.12.1 & 1.11.1 jquery-ui-i18n.min.js
Is it not just the language file that does not have them?
https://github.com/jquery/jquery-ui/blob/49bb397606b476eacd9df2bda0388795a22fa59a/ui/i18n/datepicker-ar.js#L28
Thanks for the report. Since the issue is already in 1.12, given limited team resources it's not likely to be fixed by the UI team; see the project status at https://blog.jqueryui.com/2021/10/jquery-maintainers-update-and-transition-jquery-ui-as-part-of-overall-modernization-efforts/. PRs are welcome if they're not too complex and contain tests.