forked from ScoDoc/ScoDoc
Merge branch 'main96' of https://scodoc.org/git/iziram/ScoDoc
This commit is contained in:
commit
77993ec9e7
@ -219,20 +219,27 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function dayOnly() {
|
function dayOnly() {
|
||||||
|
const { deb, fin } = getDates();
|
||||||
|
|
||||||
if (document.getElementById('justi_journee').checked) {
|
if (document.getElementById('justi_journee').checked) {
|
||||||
document.getElementById("justi_date_debut").type = "date"
|
document.getElementById("justi_date_debut").type = "date"
|
||||||
|
document.getElementById("justi_date_debut").value = deb.slice(0, deb.indexOf('T'))
|
||||||
|
|
||||||
document.getElementById("justi_date_fin").type = "date"
|
document.getElementById("justi_date_fin").type = "date"
|
||||||
|
document.getElementById("justi_date_fin").value = fin.slice(0, fin.indexOf('T'))
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("justi_date_debut").type = "datetime-local"
|
document.getElementById("justi_date_debut").type = "datetime-local"
|
||||||
|
document.getElementById("justi_date_debut").value = `${deb}T${assi_morning}`
|
||||||
|
|
||||||
document.getElementById("justi_date_fin").type = "datetime-local"
|
document.getElementById("justi_date_fin").type = "datetime-local"
|
||||||
|
document.getElementById("justi_date_fin").value = `${fin}T${assi_evening}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDates() {
|
function getDates() {
|
||||||
if (document.querySelector('.page #justi_journee').checked) {
|
if (document.querySelector('.page #justi_journee').checked) {
|
||||||
const date_str_deb = document.querySelector(".page #justi_date_debut").value
|
const date_str_deb = document.querySelector(".page #justi_date_debut").value
|
||||||
const date_str_fin = document.querySelector(".page #justi_date_debut").value
|
const date_str_fin = document.querySelector(".page #justi_date_fin").value
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user