diff --git a/src/web/module/maestro_section_record.html b/src/web/module/maestro_section_record.html index 1253519..4d912e3 100644 --- a/src/web/module/maestro_section_record.html +++ b/src/web/module/maestro_section_record.html @@ -61,8 +61,14 @@ function setDatePickersForYears(years) { function updateDatePickerIn(inputID, date) { var yyyy = date.getFullYear(); - var mm = String(date.getMonth() + 1).padStart(2, '0'); //January is 0! - var dd = String(date.getDate()).padStart(2, '0'); + var mm = String(date.getMonth() + 1); //January is 0! + if(mm.length === 1) { + mm = "0" + mm; + } + var dd = String(date.getDate()); + if(dd.length === 1) { + dd = "0" + dd; + } $(inputID).datepicker('update', yyyy + "-" + mm + "-" + dd); }