]> git.mxchange.org Git - friendica.git/commitdiff
localize the datepicker
authorrabuzarus <rabuzarus@t-online.de>
Sun, 4 Mar 2018 13:56:51 +0000 (14:56 +0100)
committerrabuzarus <rabuzarus@t-online.de>
Sun, 4 Mar 2018 13:56:51 +0000 (14:56 +0100)
view/templates/field_datetime.tpl

index 6b34316727537c48b17d57eb8d1601df2262f9de..6e26b0db914f039e60d40e8ec661d47bee522471 100644 (file)
@@ -1,4 +1,6 @@
-{{include file='field_input.tpl' field=$field}}<script type="text/javascript">
+{{include file='field_input.tpl' field=$field}}
+
+<script type="text/javascript">
        $(function () {
                $('#id_{{$field.0}}').datetimepicker({
                        step: 5,
                        dayOfWeekStart: {{$datetimepicker.firstDay}},
                        lang: '{{$datetimepicker.lang}}'
                });
+{{if $datetimepicker.lang}}
+               jQuery.datetimepicker.setLocale('{{$datetimepicker.lang}}');
+{{/if}}
+
 {{if $datetimepicker.minfrom }}
                $('#id_{{$datetimepicker.minfrom}}').data('xdsoft_datetimepicker').setOptions({
                        onChangeDateTime: function (currentDateTime) {