Skip to content

Commit 08f64f7

Browse files
authored
fix(calendar): prevent all-day event date drift on save (open-webui#25864)
1 parent e3ba698 commit 08f64f7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/lib/components/calendar/CalendarEventModal.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@
3939
const NS = 1_000_000;
4040
4141
function nsToDateStr(ns: number): string {
42-
return new Date(ns / NS).toISOString().slice(0, 10);
42+
const d = new Date(ns / NS);
43+
const year = d.getFullYear();
44+
const month = String(d.getMonth() + 1).padStart(2, '0');
45+
const day = String(d.getDate()).padStart(2, '0');
46+
return `${year}-${month}-${day}`;
4347
}
4448
4549
function nsToTimeStr(ns: number): string {

0 commit comments

Comments
 (0)