N°1053: Set the first day of the week on date/time picker to a language based setting

* Update moment.js
* Add locales to moment.js
* Align console & portal on the same moment.js library
This commit is contained in:
steffunky
2018-11-06 11:05:28 +01:00
parent e4619fbc0f
commit 00bd7583f7
20 changed files with 25 additions and 17 deletions

View File

@@ -91,9 +91,10 @@ class BsSimpleFieldRenderer extends FieldRenderer
$oOutput->AddHtml('<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>');
$oOutput->AddHtml('</div>');
$sJSFormat = json_encode($this->oField->GetJSDateTimeFormat());
$sLocale = Dict::S('Portal:Calendar-FirstDayOfWeek');
$oOutput->AddJs(
<<<EOF
$('#datepicker_{$this->oField->GetGlobalId()}').datetimepicker({format: $sJSFormat});
$('#datepicker_{$this->oField->GetGlobalId()}').datetimepicker({format: $sJSFormat, locale: '$sLocale'});
EOF
);
break;