Skip to content

Commit

Permalink
correction format temps
Browse files Browse the repository at this point in the history
Nico-L committed Feb 2, 2022
1 parent 21930b6 commit ac80e87
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/FormAtelier.svelte
Original file line number Diff line number Diff line change
@@ -124,12 +124,20 @@ function sauveAtelier() {
let heureDebutTemp = heureDebut.split('h')
jourDebut.setHours(heureDebutTemp[0])
jourDebut.setMinutes(heureDebutTemp[1])
var heureDebutFormat = heureDebut.split('h').join(':') + ":00"
if (parseInt((heureDebut.split('h'))[0])<10) {
heureDebutFormat = "0"+heureDebutFormat
}
var heureFinFormat = heureFin.split('h').join(':') + ":00"
if (parseInt((heureFin.split('h'))[0])<10) {
heureFinFormat = "0"+heureFinFormat
}
variables = {
titre: editAtelier.titre || "Un nouvel atelier",
lieu: editAtelier.lieu || "La Bonne Fabrique",
date: new Date(jourDebut),
debut: heureDebut.split('h').join(':') + ":00",
fin: heureFin.split('h').join(':') + ":00",
debut: heureDebutFormat,
fin: heureFinFormat,
description: editAtelier.description || "Un nouvel atelier sympa !",
espace: editAtelier.espace.id,
nbParticipants: editAtelier.nbParticipants,

0 comments on commit ac80e87

Please sign in to comment.