fix(calendar): isoDay use local date parts — fixes MSK off-by-one day grouping
This commit is contained in:
@@ -57,7 +57,11 @@ function formatDate(iso) {
|
||||
}
|
||||
|
||||
function isoDay(date) {
|
||||
return date.toISOString().slice(0, 10);
|
||||
// Ключ локального дня (НЕ UTC) — иначе в МСК события смещаются на день
|
||||
const y = date.getFullYear();
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const d = String(date.getDate()).padStart(2, '0');
|
||||
return `${y}-${m}-${d}`;
|
||||
}
|
||||
|
||||
// ── EventCard ────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user