Skip to content

fix: include start/end time when validating availability window#716

Open
adeiji wants to merge 3 commits intodevfrom
fix/scheduled-event-end-date
Open

fix: include start/end time when validating availability window#716
adeiji wants to merge 3 commits intodevfrom
fix/scheduled-event-end-date

Conversation

@adeiji
Copy link
Copy Markdown

@adeiji adeiji commented Apr 2, 2026

📝 Description

🔗 Jira Ticket M2-8773

Fixed a bug where scheduled events were not showing on the end date. For example, if the scheduled event's end date was April 1, 2026 @ 11:59 PM and on April 1, 2026 @ 5 PM the user is viewing available events, the event would not show up. Now, when viewing the event on the last day:

  • The event shows on the dashboard

🪤 Peer Testing

  • Create a scheduled event in the admin app with an end date of today, and the end time some time in the future
  • Open the web app, and select the applet with the event

Expected Outcome: The event should be visible

  • Go back to the admin app, and set the end time to an earlier time.
  • Go back to the web app and refresh.

Expected outcome: The event should not be visible

✏️ Notes

Validation was comparing only the date component and ignoring the time component.

@aws-amplify-us-east-1
Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-716.dek0ppt2nc92n.amplifyapp.com

@adeiji adeiji force-pushed the fix/scheduled-event-end-date branch from 1f797c7 to c3b8fcf Compare April 7, 2026 14:43
@adeiji adeiji requested review from divbzero April 7, 2026 15:13
Copy link
Copy Markdown
Contributor

@sricharan-varanasi sricharan-varanasi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, Ade.
Can we add tests for this case?


public isInsideValidDatesInterval(event: ScheduleEvent) {
const { startDate, endDate } = event.availability;
const { timeFrom, timeTo } = event.availability;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we do a single destructure instead of two?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants