root / drupal7 / modules / locale / locale.datepicker.js @ 6d8023f2
1 |
(function ($) { |
---|---|
2 |
|
3 |
/**
|
4 |
* Attaches language support to the jQuery UI datepicker component.
|
5 |
*/
|
6 |
Drupal.behaviors.localeDatepicker = { |
7 |
attach: function(context, settings) { |
8 |
// This code accesses Drupal.settings and localized strings via Drupal.t().
|
9 |
// So this code should run after these are initialized. By placing it in an
|
10 |
// attach behavior this is assured.
|
11 |
$.datepicker.regional['drupal-locale'] = $.extend({ |
12 |
closeText: Drupal.t('Done'), |
13 |
prevText: Drupal.t('Prev'), |
14 |
nextText: Drupal.t('Next'), |
15 |
currentText: Drupal.t('Today'), |
16 |
monthNames: [
|
17 |
Drupal.t('January'),
|
18 |
Drupal.t('February'),
|
19 |
Drupal.t('March'),
|
20 |
Drupal.t('April'),
|
21 |
Drupal.t('May'),
|
22 |
Drupal.t('June'),
|
23 |
Drupal.t('July'),
|
24 |
Drupal.t('August'),
|
25 |
Drupal.t('September'),
|
26 |
Drupal.t('October'),
|
27 |
Drupal.t('November'),
|
28 |
Drupal.t('December')
|
29 |
], |
30 |
monthNamesShort: [
|
31 |
Drupal.t('Jan'),
|
32 |
Drupal.t('Feb'),
|
33 |
Drupal.t('Mar'),
|
34 |
Drupal.t('Apr'),
|
35 |
Drupal.t('May'),
|
36 |
Drupal.t('Jun'),
|
37 |
Drupal.t('Jul'),
|
38 |
Drupal.t('Aug'),
|
39 |
Drupal.t('Sep'),
|
40 |
Drupal.t('Oct'),
|
41 |
Drupal.t('Nov'),
|
42 |
Drupal.t('Dec')
|
43 |
], |
44 |
dayNames: [
|
45 |
Drupal.t('Sunday'),
|
46 |
Drupal.t('Monday'),
|
47 |
Drupal.t('Tuesday'),
|
48 |
Drupal.t('Wednesday'),
|
49 |
Drupal.t('Thursday'),
|
50 |
Drupal.t('Friday'),
|
51 |
Drupal.t('Saturday')
|
52 |
], |
53 |
dayNamesShort: [
|
54 |
Drupal.t('Sun'),
|
55 |
Drupal.t('Mon'),
|
56 |
Drupal.t('Tue'),
|
57 |
Drupal.t('Wed'),
|
58 |
Drupal.t('Thu'),
|
59 |
Drupal.t('Fri'),
|
60 |
Drupal.t('Sat')
|
61 |
], |
62 |
dayNamesMin: [
|
63 |
Drupal.t('Su'),
|
64 |
Drupal.t('Mo'),
|
65 |
Drupal.t('Tu'),
|
66 |
Drupal.t('We'),
|
67 |
Drupal.t('Th'),
|
68 |
Drupal.t('Fr'),
|
69 |
Drupal.t('Sa')
|
70 |
], |
71 |
dateFormat: Drupal.t('mm/dd/yy'), |
72 |
firstDay: 0, |
73 |
isRTL: 0 |
74 |
}, Drupal.settings.jquery.ui.datepicker); |
75 |
$.datepicker.setDefaults($.datepicker.regional['drupal-locale']); |
76 |
} |
77 |
}; |
78 |
|
79 |
})(jQuery); |