nodebb-plugin-onekite-calendar 2.0.6 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/lib/api.js +14 -0
- package/package.json +1 -1
- package/plugin.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Changelog – calendar-onekite
|
|
2
2
|
|
|
3
|
+
## 1.2.14
|
|
4
|
+
- Réservations : correction d’un faux chevauchement (problème 1h) quand FullCalendar envoie des bornes all-day à minuit UTC (Z / +00:00) — le lendemain n’est plus marqué « non disponible ».
|
|
5
|
+
|
|
3
6
|
## 1.2.13
|
|
4
7
|
- ACP (mode sombre) : correction de la visibilité de la liste d’autocomplete d’adresse (couleurs via variables Bootstrap)
|
|
5
8
|
|
package/lib/api.js
CHANGED
|
@@ -214,6 +214,20 @@ function toTs(v) {
|
|
|
214
214
|
const s = String(v).trim();
|
|
215
215
|
if (/^[0-9]+$/.test(s)) return parseInt(s, 10);
|
|
216
216
|
|
|
217
|
+
// IMPORTANT (all-day boundaries / FullCalendar):
|
|
218
|
+
// Depending on FullCalendar config (or how dates are built), all-day range
|
|
219
|
+
// boundaries can arrive as an ISO string at **midnight UTC** (Z or +00:00).
|
|
220
|
+
// Example: 2026-01-11T00:00:00.000Z
|
|
221
|
+
// In Europe/Paris this is 01:00 local, which makes consecutive all-day ranges
|
|
222
|
+
// appear to overlap by 1 hour and wrongly marks the next day as unavailable.
|
|
223
|
+
// When we detect a midnight-UTC boundary, we treat it as a calendar date and
|
|
224
|
+
// convert to **local midnight** for overlap computations.
|
|
225
|
+
const mUtcMidnight = /^((\d{4}-\d{2}-\d{2}))T00:00:00(?:\.\d{1,3})?(?:Z|\+00:00)$/.exec(s);
|
|
226
|
+
if (mUtcMidnight && mUtcMidnight[1]) {
|
|
227
|
+
const dLocal = new Date(mUtcMidnight[1] + 'T00:00:00');
|
|
228
|
+
return dLocal.getTime();
|
|
229
|
+
}
|
|
230
|
+
|
|
217
231
|
// IMPORTANT: Date-only strings like "2026-01-09" are interpreted as UTC by JS Date(),
|
|
218
232
|
// which can create 1h overlaps in Europe/Paris (and other TZs) between consecutive days.
|
|
219
233
|
// We treat date-only inputs as local-midnight by appending a time component.
|
package/package.json
CHANGED
package/plugin.json
CHANGED