3 * Datepicker JavaScript for the Locale module.
6 (function ($, Drupal, drupalSettings) {
11 * Attaches language support to the jQuery UI datepicker component.
13 * @type {Drupal~behavior}
15 Drupal.behaviors.localeDatepicker = {
16 attach: function (context, settings) {
17 // This code accesses drupalSettings and localized strings via Drupal.t().
18 // So this code should run after these are initialized. By placing it in an
19 // attach behavior this is assured.
20 $.datepicker.regional['drupal-locale'] = $.extend({
21 closeText: Drupal.t('Done'),
22 prevText: Drupal.t('Prev'),
23 nextText: Drupal.t('Next'),
24 currentText: Drupal.t('Today'),
26 Drupal.t('January', {}, {context: 'Long month name'}),
27 Drupal.t('February', {}, {context: 'Long month name'}),
28 Drupal.t('March', {}, {context: 'Long month name'}),
29 Drupal.t('April', {}, {context: 'Long month name'}),
30 Drupal.t('May', {}, {context: 'Long month name'}),
31 Drupal.t('June', {}, {context: 'Long month name'}),
32 Drupal.t('July', {}, {context: 'Long month name'}),
33 Drupal.t('August', {}, {context: 'Long month name'}),
34 Drupal.t('September', {}, {context: 'Long month name'}),
35 Drupal.t('October', {}, {context: 'Long month name'}),
36 Drupal.t('November', {}, {context: 'Long month name'}),
37 Drupal.t('December', {}, {context: 'Long month name'})
57 Drupal.t('Wednesday'),
80 dateFormat: Drupal.t('mm/dd/yy'),
83 }, drupalSettings.jquery.ui.datepicker);
84 $.datepicker.setDefaults($.datepicker.regional['drupal-locale']);
88 })(jQuery, Drupal, drupalSettings);