diff --git a/app/static/js/assiduites.js b/app/static/js/assiduites.js index 63b78620f..9e05312b1 100644 --- a/app/static/js/assiduites.js +++ b/app/static/js/assiduites.js @@ -1,6 +1,5 @@ // <=== CONSTANTS and GLOBALS ===> -const TIMEZONE = "Europe/Paris"; let url; function getUrl() { @@ -630,13 +629,17 @@ function updateDate() { ) ); openAlertModal("Attention", div, "", "#eec660"); - $(dateInput).datepicker( - "setDate", - Date.toFRA(lastWorkDay.toIsoUtcString().split("T")[0]) - ); + const date_fra = Date.toFRA(lastWorkDay.toIsoUtcString().split("T")[0]); + + $(dateInput).datepicker("setDate", date_fra); + dateInput.value = date_fra; + date = lastWorkDay; dateStr = formatDate(lastWorkDay).capitalize(); } + + console.warn(dateStr, date, date.toIsoUtcString()); + document.querySelector("#datestr").textContent = dateStr; return true; } diff --git a/app/templates/assiduites/pages/signal_assiduites_group.j2 b/app/templates/assiduites/pages/signal_assiduites_group.j2 index 6e761c3a1..15fd6a48f 100644 --- a/app/templates/assiduites/pages/signal_assiduites_group.j2 +++ b/app/templates/assiduites/pages/signal_assiduites_group.j2 @@ -89,8 +89,8 @@ const readOnly = {{ readonly }}; - updateDate(); setupDate(); + updateDate(); setupTimeLine(); window.forceModule = "{{ forcer_module }}"