jquery / jquery-ui

The official jQuery user interface library.
https://jqueryui.com
Other
11.26k stars 5.32k forks source link

Datepicker Localization Bug: Arabic Months Short Names Displayed as Numbers #2302

Open raghoottamkatti opened 1 month ago

raghoottamkatti commented 1 month ago

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:

  1. Initialize the jQuery datepicker with the following settings: javascript $('#datepicker').datepicker({ dateFormat: 'mm/dd/yy', changeMonth: true, changeYear: true, regional: 'ar' // Arabic localization });
  2. Open the datepicker.
  3. Observe the month short names displayed.

Expected Behavior: The month short names should be displayed as:

Actual Behavior: The month short names are displayed as numbers (1, 2, 3, ...).

image image

mgol commented 1 month ago

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?

raghoottamkatti commented 1 month ago

@mgol the issue occurs when using jQueryUI 1.12.1 & 1.11.1 jquery-ui-i18n.min.js

markvantilburg commented 1 month ago

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

mgol commented 1 month ago

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.