Skip to content

Commit

Permalink
Materialize CSS : traduction du datepicker (#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn authored Aug 25, 2023
1 parent 623dfb2 commit 948065d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
7 changes: 4 additions & 3 deletions app/Resources/views/admin/closingexception/new.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@

{{ form_start(form) }}
{% include "/admin/closingexception/_partial/form.html.twig" with { form: form } %}
<div>
<button type="submit" class="btn waves-effect waves-light">Créer</button>
</div>
<button type="submit" class="btn waves-effect waves-light" title="Créer">
<i class="material-icons left">save</i>Créer</button>
{{ form_end(form) }}

<a href="{{ path('admin_closingexception_index') }}" class="btn waves-effect waves-light red" title="Annuler">Annuler</a>
{% endblock %}
21 changes: 4 additions & 17 deletions src/AppBundle/Resources/public/js/datepicker.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@

jQuery.extend(jQuery.fn.datepicker.defaults, {
monthsFull: [ 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre' ],
monthsShort: [ 'Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec' ],
weekdaysFull: [ 'Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi' ],
weekdaysShort: [ 'Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam' ],
today: 'Aujourd\'hui',
clear: 'Effacer',
close: 'Fermer',
firstDay: 1,
format: 'yyyy-mm-dd',
formatSubmit: 'yyyy-mm-dd',
labelMonthNext: 'Mois suivant',
labelMonthPrev: 'Mois précédent',
labelMonthSelect: 'Sélectionner un mois',
labelYearSelect: 'Sélectionner une année'
});

// https://materializeweb.com/pickers.html
datepickerSettings = {
format: 'yyyy-mm-dd',
Expand All @@ -24,6 +7,10 @@ datepickerSettings = {
done: 'OK', // text for done-button
clear: 'Effacer', // text for clear-button
cancel: 'Annuler', // Text for cancel-button
months: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
monthsShort: ['Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec'],
weekdays: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'],
weekdaysShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'],
},
autoClose: true // Close upon selecting a date
}
Expand Down

0 comments on commit 948065d

Please sign in to comment.