diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-04-16 11:18:08 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-04-16 11:18:08 +0200 |
| commit | 412501a5dc8f8826f10eac0c19adfa82527ad4bb (patch) | |
| tree | 76b7408ff58ac78c16a585b8ed7c41d97770e999 /addons/web/static/lib | |
| parent | 4162360ae2114bc6eee25e2ffca0e0d48e1ef644 (diff) | |
| parent | 71476226653ba0326cfc0331e1463364cfb89f4e (diff) | |
[MERGE] forward port branch 10.0 up to 71476226653
Diffstat (limited to 'addons/web/static/lib')
| -rw-r--r-- | addons/web/static/lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/addons/web/static/lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js b/addons/web/static/lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js index 8619c44a7d6..304845a0fee 100644 --- a/addons/web/static/lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js +++ b/addons/web/static/lib/bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js @@ -391,18 +391,14 @@ THE SOFTWARE. if (picker.options.calendarWeeks === true) { html.append('<th class="cw">#</th>'); } - if (moment().localeData()._week.dow === 0) { // starts on Sunday - for (i = 0; i < 7; i++) { - html.append('<th class="dow">' + weekdaysMin[i] + '</th>'); - } - } else { - for (i = 1; i < 8; i++) { - if (i === 7) { - html.append('<th class="dow">' + weekdaysMin[0] + '</th>'); - } else { - html.append('<th class="dow">' + weekdaysMin[i] + '</th>'); - } - } + // ODOO change so week starting not on sunday/monday have correct + // day name. This is solved in saas-15 by using new library version + var startDay = moment().localeData()._week.dow; + if (startDay === undefined) { + startDay = 1; + } + for (i = startDay; i < startDay + 7; i++) { + html.append('<th class="dow">' + weekdaysMin[i % 7] + '</th>'); } picker.widget.find('.datepicker-days thead').append(html); }, |
