No soft or hard edits for an end date before the start date, plus another end date quirk

Environment

Discourse Version: 3.1.0.beta2

Plugin Commit: GitHub - paviliondev/discourse-events: Allows you to manage events in Discourse

Steps to Reproduce

  1. Click the Create a new Topic button.
  2. Click on the gear icon to reveal more WYSIWYG options.
  3. Select “Create event”.
  4. Enter a start date and time greater than the current time.
  5. Enter an end date equal to the start date.
  6. Enter an end time of 16:15.
  7. Manually change the day field in the end date (e.g., from 02/16/2023 to 02/10/2023) to a value before the start date.
  8. The end time changes from 16:15 to 16:30 (issue #1)
  9. Enter the remaining required fields.
  10. Press the Create button.
  11. The output automatically changes the end date to match the start date without notifying the user (issue #2).

It’s:

[e vent start=“2023-02-16 15:30” status=“public” name=“Joel’s Test Event” timezone=“America/Chicago” end=“2023-02-16 16:30” allowedGroups=“trust_level_0”]
[/e vent]

Versus:

[e vent start=“2023-02-16 15:30” status=“public” name=“Joel’s Test Event” timezone=“America/Chicago” end=“2023-02-10 16:30” allowedGroups=“trust_level_0”]
[/e vent]

  1. Manually edit the date in the end date code from 2023-02-16 to 2023-02-10.
  2. The preview in the composer shows an end date before the start date with no visual indicator that something is wrong.
  3. Press the Create Topic button.
  4. There is no soft or hard edit notifying the user that the end date is before the start date.

Example

https://forum.test.theputtyverse.com/

This is our test environment which is protected from logged by two layers. We’re not running the Discourse Events plugin in production yet.

Logs

A screencast of the issues can be found here:

https://www.loom.com/share/476c433e3a1d4c47a78a0eb7bccc5c08

Hey @JoelZaslofsky :slight_smile:

This is an issue with the Discourse Event plugin, not Pavilion’s Events Plugin.