summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2025-06-19 11:55:01 +0200
committerpolo <ordipolo@gmx.fr>2025-06-19 11:55:01 +0200
commitf582e617f6fea0a543ba9e683b9637f9557bb997 (patch)
tree4d9eebe9671da71da85dc738c0d6c2104f4205b3 /public
parent2521ba44fed09eaf8ba8569e783e1c7468e3f31d (diff)
downloadfullcalendar-f582e617f6fea0a543ba9e683b9637f9557bb997.zip
affichage date visiteur correct
Diffstat (limited to 'public')
-rw-r--r--public/css/calendar.css1
-rw-r--r--public/js/calendar.js18
2 files changed, 13 insertions, 6 deletions
diff --git a/public/css/calendar.css b/public/css/calendar.css
index b762a89..5dfb343 100644
--- a/public/css/calendar.css
+++ b/public/css/calendar.css
@@ -1,6 +1,7 @@
1.event{ 1.event{
2 border: 2px double; 2 border: 2px double;
3 border-radius: 5px; 3 border-radius: 5px;
4 width: max-content;
4} 5}
5#calendar_zone{ 6#calendar_zone{
6 display: flex; 7 display: flex;
diff --git a/public/js/calendar.js b/public/js/calendar.js
index fb26e80..af9ffb4 100644
--- a/public/js/calendar.js
+++ b/public/js/calendar.js
@@ -52,15 +52,21 @@ document.addEventListener('DOMContentLoaded', function(){
52 return date; 52 return date;
53 } 53 }
54 54
55 const formated_start = formatDate(info.event.start); 55 const start = formatDate(info.event.start);
56 const formated_end = formatDate(info.event.allDay ? getEndMinusOneDay(info.event.end) : info.event.end, info.event.allDay); 56 const start_date = start.split('T')[0];
57 57 const start_hour = (info.event.allDay ? '' : '<br>à ' + start.split('T')[1]).replace(":", "h");
58 const formated_start = 'le ' + start_date.split('-')[2] + '/' + start_date.split('-')[1] + '/' + start_date.split('-')[0] + start_hour;
59 const end = formatDate(info.event.allDay ? getEndMinusOneDay(info.event.end) : info.event.end, info.event.allDay);
60 const end_date = end.split('T')[0];
61 const end_hour = (info.event.allDay ? '' : '<br>à ' + end.split('T')[1]).replace(":", "h");
62 const formated_end = 'le ' + end_date.split('-')[2] + '/' + end_date.split('-')[1] + '/' + end_date.split('-')[0] + end_hour;
63
58 const aside_content = `<div class="event" style="border-color: ` + info.event.backgroundColor +`;"> 64 const aside_content = `<div class="event" style="border-color: ` + info.event.backgroundColor +`;">
59 <h3>` + info.event.title + `</h3> 65 <h3>` + info.event.title + `</h3>
60 <p><i>` + info.event.extendedProps.description + `</i></p> 66 <p><i>` + info.event.extendedProps.description + `</i></p>
61 <p>Journée entière: ` + (checked ? 'oui' : 'non') + `</p> 67 <p>Journée entière: <br>` + (checked ? 'oui' : 'non') + `</p>
62 <p>Début: ` + formated_start + `</p> 68 <p>Début: <br>` + formated_start + `</p>
63 <p>Fin: ` + formated_end + `</p> 69 <p>Fin: <br> ` + formated_end + `</p>
64 </div>`; 70 </div>`;
65 71
66 aside.innerHTML = aside_content; 72 aside.innerHTML = aside_content;