Quantcast
Viewing all articles
Browse latest Browse all 294878

Setting dateFormat for datepicker should not be translated

File /core/modules/locale/locale.datepicker.js, line 78:
dateFormat: Drupal.t('mm/dd/yy'),

This line sets a localized value for the setting dateFormat for jquery UI datepickers. However this setting should not be trnslated at all, as it should only use a give set of format characters (like the php date() function). See the jquery ui documentation: http://api.jqueryui.com/datepicker/#option-dateFormat

To solve just remove this line from this file in the locale module. If it should get a setting from Drupal at all, it should not be done in the locale module.

Image may be NSFW.
Clik here to view.
ScreenHunter_67 Apr. 22.jpg
Image may be NSFW.
Clik here to view.
ScreenHunter_68 Apr. 22.jpg

These settings look erroneous to me as well:
- firstDay (line 79): is not a locale specific setting but a system wide setting, and thus should be set elsewhere (if it should be set at all).
- isRTL (line 80): should get a correct setting based on the current language.

Possibly related issues:
- #1761826: Add Date Format data to Drupal.settings.
- #507502: (needs documentation) Provide Locale support for jQuery UI (the issue that introduced or did not solve this and still needs documentation)

AttachmentSizeStatusTest resultOperations
ScreenHunter_67 Apr. 22.jpg18.48 KBIgnored: Check issue status.NoneNone
ScreenHunter_68 Apr. 22.jpg4.89 KBIgnored: Check issue status.NoneNone

Viewing all articles
Browse latest Browse all 294878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>