mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-06 02:48:04 +00:00
fix(calendar): prevent all-day event date drift on save
This commit is contained in:
parent
b1d40f3409
commit
2f295710fa
1 changed files with 5 additions and 1 deletions
|
|
@ -39,7 +39,11 @@
|
|||
const NS = 1_000_000;
|
||||
|
||||
function nsToDateStr(ns: number): string {
|
||||
return new Date(ns / NS).toISOString().slice(0, 10);
|
||||
const d = new Date(ns / NS);
|
||||
const year = d.getFullYear();
|
||||
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(d.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
|
||||
function nsToTimeStr(ns: number): string {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue