fix: default new task due date to today
ci / docker (push) Successful in 6m22s

This commit is contained in:
2026-09-08 09:11:47 +08:00
parent 5e0c168da1
commit 113791229a
4 changed files with 21 additions and 4 deletions
+7
View File
@@ -144,6 +144,13 @@ export function parseTaskRrule(rrule = ''): TaskRepeatConfig {
}
}
export function defaultTaskDueAt(now = new Date()) {
const year = now.getFullYear()
const month = `${now.getMonth() + 1}`.padStart(2, '0')
const day = `${now.getDate()}`.padStart(2, '0')
return `${year}-${month}-${day}T12:00`
}
export function toDateTimeLocal(value: string | null | undefined) {
if (!value) return ''
const date = new Date(value)