Assiduites : fix initialisation datepicker signal_assiduite_group

This commit is contained in:
Iziram 2024-01-21 22:11:07 +01:00
parent 32a4ada483
commit a04278f301
2 changed files with 52 additions and 2 deletions

View File

@ -720,7 +720,57 @@ function setupDate(onchange = null) {
//Initialisation du datepicker //Initialisation du datepicker
// sinon on ne peut pas le mettre à jour // 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) { if (onchange != null) {
$(input).change(onchange); $(input).change(onchange);

View File

@ -20,7 +20,7 @@
<div class="infos-button">Groupes&nbsp;: {{grp|safe}}</div> <div class="infos-button">Groupes&nbsp;: {{grp|safe}}</div>
<div class="infos-button" style="margin-left: 24px;">Date&nbsp;: <span style="margin-left: 8px;" <div class="infos-button" style="margin-left: 24px;">Date&nbsp;: <span style="margin-left: 8px;"
id="datestr"></span> 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()"> onchange="updateDate()">
</div> </div>
</div> </div>