templates/employee_history/new_edit.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{ title }}{% endblock %}
  3. {% block body %}
  4.     <div class="card mb-5 mb-xl-10">
  5.         <div class="card-body pt-9 pb-0">
  6.             {% include 'employee_history/_employee_history_fields.html.twig' with{employeeHistory: employeeHistory, form: form} %}
  7.         </div>
  8.     </div>
  9. {% endblock %}
  10. {% block javascripts %}
  11.     <script>
  12.         var daterangepicker = $('.eh_date');
  13.         daterangepicker.daterangepicker({
  14.             "singleDatePicker": true,
  15.             "showDropdowns": true,
  16.             "autoUpdateInput": false,
  17.             "timePicker": true,
  18.             "timePicker24Hour": true,
  19.             "timePickerSeconds": true,
  20.             "locale": {
  21.                 "format": "DD/MM/YYYY HH:mm:ss",
  22.                 "applyLabel": "Appliquer",
  23.                 "cancelLabel": "Annuler",
  24.                 "weekLabel": "W",
  25.                 "firstDay": 1,
  26.             }
  27.         });
  28.         daterangepicker.on('apply.daterangepicker', function (ev, picker) {
  29.             $(this).val(picker.startDate.format("DD/MM/YYYY HH:mm:ss"));
  30.         });
  31.         daterangepicker.on('cancel.daterangepicker', function (ev, picker) {
  32.             $(this).val('');
  33.         });
  34.     </script>
  35. {% endblock %}