Merge branch 'staging' into 'main'
fix time in logbook See merge request PhilippHofer/rot!51
This commit is contained in:
commit
c64c93692e
@ -22,7 +22,11 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
|
|
||||||
function setCurrentdate(input: HTMLInputElement) {
|
function setCurrentdate(input: HTMLInputElement) {
|
||||||
if(input) {
|
if(input) {
|
||||||
input.value = (new Date().toJSON().slice(0,16));
|
const inputElement = document.getElementById("departure") as HTMLInputElement;
|
||||||
|
const now = new Date();
|
||||||
|
const formattedDateTime = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}T${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}`;
|
||||||
|
|
||||||
|
inputElement.value = formattedDateTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user