1
0
forked from ScoDoc/ScoDoc
This commit is contained in:
Emmanuel Viennet 2024-01-21 22:23:39 +01:00
commit 45c685d725
2 changed files with 52 additions and 2 deletions

View File

@ -720,7 +720,57 @@ function setupDate(onchange = null) {
//Initialisation du datepicker
// sinon on ne peut pas le mettre à jour
$(input).datepicker();
$(input).datepicker({
showOn: "button",
buttonImage: "/ScoDoc/static/icons/calendar_img.png",
buttonImageOnly: true,
dateFormat: "dd/mm/yy",
duration: "fast",
firstDay: 1, // Start with Monday
dayNames: [
"Dimanche",
"Lundi",
"Mardi",
"Mercredi",
"Jeudi",
"Vendredi",
"Samedi",
],
dayNamesMin: ["Di", "Lu", "Ma", "Me", "Je", "Ve", "Sa"],
dayNamesShort: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"],
monthNames: [
"Janvier",
"Février",
"Mars",
"Avril",
"May",
"Juin",
"Juilet",
"Août",
"Septembre",
"Octobre",
"Novembre",
"Décembre",
],
monthNamesShort: [
"Jan",
"Fév",
"Mar",
"Avr",
"Mai",
"Juin",
"Juil",
"Aoû",
"Sep",
"Oct",
"Nov",
"Déc",
],
});
$(input).datepicker(
"option",
$.extend({ showMonthAfterYear: false }, $.datepicker.regional["fr"])
);
if (onchange != null) {
$(input).change(onchange);

View File

@ -102,7 +102,7 @@
<div class="infos-button">Groupes&nbsp;: {{grp|safe}}</div>
<div class="infos-button" style="margin-left: 24px;">Date&nbsp;: <span style="margin-left: 8px;"
id="datestr"></span>
<input type="text" class="datepicker" name="tl_date" id="tl_date" value="{{ date }}"
<input type="text" name="tl_date" id="tl_date" value="{{ date }}"
onchange="updateDate()">
</div>
</div>