No way to get date format from JS ?

use case, locale.picker.js

dateFormat: Drupal.t('mm/dd/yy'),

Comments

fietserwin’s picture

- What date format would you like to access (all, all localized)?
- How does this request relate to #1976614: Setting jQuery UI Datepicker's dateFormat should not be translated?

droplet’s picture

these admin/config/regional/date-time formats

fietserwin’s picture

There are a lot of settings that are not available by default in JavaScript. E.g. the current language is not even available. This is probably done to not increase the page load for each and every page. If you need specific settings on the client side, you probably need them because you are writing a custom/contrib module that needs them. Then it is up to that custom module to add the necessary settings to the Drupal.settings object.

So I think this is a won't fix.

nod_’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Agreed. Add that from your module if you need it, core doesn't have to include it in the default settings.