1

Tempus Dominus for Bootstrap 4 を使用して datetimepicker の言語/ロケールを設定しようとしています。Tempus Dominus Bootstrap 4 の提案に従って言語/ロケールを変更しましたが、何も機能していないようです。ロケールを「de」に設定したいのですが、何があっても「en」のままです。解決策を知っている人はいますか?

  <!DOCTYPE html>
<html lang="en">
<head>
  <title id="doc_title">Ueberblick</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta http-equiv="Cache-Control" content="no-cache">
  <meta http-equiv="Cache-Control" content="no-store">
  <meta http-equiv="Cache-Control" content="must-revalidate">
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.0/moment.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.39.0/js/tempusdominus-bootstrap-4.min.js" integrity="sha512-k6/Bkb8Fxf/c1Tkyl39yJwcOZ1P4cRrJu77p83zJjN2Z55prbFHxPs9vN7q3l3+tSMGPDdoH51AEU8Vgo1cgAA==" crossorigin="anonymous"></script>
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment-with-locales.min.js"></script>  
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.39.0/css/tempusdominus-bootstrap-4.min.css" integrity="sha512-3JRrEUwaCkFUBLK1N8HehwQgu8e23jTH4np5NHOmQOobuC4ROQxFwFgBLTnhcnQRMs84muMh0PnnwXlPq5MGjg==" crossorigin="anonymous" />
  <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
</head>

<body>
<div class="col-sm-6">
  <div class="form-group">
      <div class="input-group date" id="datetimepicker4" data-target-input="nearest">
          <input type="text" class="form-control datetimepicker-input" data-target="#datetimepicker4"/>
          <div class="input-group-append" data-target="#datetimepicker4" data-toggle="datetimepicker">
              <div class="input-group-text"><i class="fa fa-calendar"></i></div>
          </div>
      </div>
  </div>
</div>
<script type="text/javascript">
  $(function () {
      $('#datetimepicker4').datetimepicker({
          format: 'DD.MM.YYYY',
          locale: 'de',
          todayHighlight: true,
          maxDate: new Date(),
          minDate: new Date("11/01/2020"),
          useCurrent: false,
          buttons: {showClear: true, showToday:true, showClose: true},
          tooltips:{today: 'Gehe zu: Heute', clear:'Auswahl löschen', close:'Kalender schließen'},
      });
  });
</script>
</body>

4

1 に答える 1