jquery-ui icon indicating copy to clipboard operation
jquery-ui copied to clipboard

Datepicker Localization Bug: Arabic Months Short Names Displayed as Numbers

Open raghoottamkatti opened this issue 1 year ago • 4 comments

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:

  • ين (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, ...).

image image

raghoottamkatti avatar Oct 15 '24 05:10 raghoottamkatti

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 avatar Oct 17 '24 22:10 mgol

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

raghoottamkatti avatar Oct 23 '24 05:10 raghoottamkatti

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

markvantilburg avatar Oct 23 '24 10:10 markvantilburg

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.

mgol avatar Oct 25 '24 12:10 mgol