default publish_at to now on new items
This commit is contained in:
@@ -217,7 +217,10 @@ const form = reactive(
|
||||
}),
|
||||
])
|
||||
),
|
||||
publish_at: FormControl("", DateTime()),
|
||||
publish_at: FormControl(
|
||||
route.params.id ? "" : new SMDate("now").format("d/M/yy h:mm aa"),
|
||||
DateTime()
|
||||
),
|
||||
status: FormControl(),
|
||||
registration_type: FormControl("none"),
|
||||
registration_data: FormControl(
|
||||
|
||||
@@ -93,7 +93,10 @@ const form = reactive(
|
||||
Form({
|
||||
title: FormControl("", And([Required(), Min(8)])),
|
||||
slug: FormControl("", And([Required(), Min(6)])),
|
||||
publish_at: FormControl("", DateTime()),
|
||||
publish_at: FormControl(
|
||||
route.params.id ? "" : new SMDate("now").format("d/M/yy h:mm aa"),
|
||||
DateTime()
|
||||
),
|
||||
hero: FormControl(),
|
||||
user_id: FormControl(userStore.id),
|
||||
content: FormControl(),
|
||||
|
||||
Reference in New Issue
Block a user