summaryrefslogtreecommitdiff
path: root/public/js/modules/new.js
diff options
context:
space:
mode:
authorRaphael Kabo <raphael.kabo@theguardian.com>2024-07-16 13:26:47 +0100
committerRaphael Kabo <raphael.kabo@theguardian.com>2024-07-16 13:26:47 +0100
commit68f5ce96ee19c77d46ddcdd18eefad6257cd47fa (patch)
tree5ad7c125bfb01feb7a718cbf7e80f1c988072678 /public/js/modules/new.js
parentee6ee9aef071162b86c72aea21da483b0bb3e050 (diff)
feat: automatically set end time after start time blurred
Diffstat (limited to 'public/js/modules/new.js')
-rw-r--r--public/js/modules/new.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/public/js/modules/new.js b/public/js/modules/new.js
index 7915b59..70df641 100644
--- a/public/js/modules/new.js
+++ b/public/js/modules/new.js
@@ -68,6 +68,11 @@ function newEventForm() {
this.data.maxAttendeesCheckbox = false;
this.data.publicCheckbox = false;
},
+ updateEventEnd() {
+ if (this.data.eventEnd === "" || this.data.eventEnd < this.data.eventStart) {
+ this.data.eventEnd = this.data.eventStart;
+ }
+ },
async submitForm() {
this.submitting = true;
this.errors = [];