Skip to content

Add offtime date validation - #207

Merged
devmount merged 1 commit into
mainfrom
enhancements/202-offtime-date-validation
Nov 2, 2026
Merged

devmount merged 1 commit into
mainfrom
enhancements/202-offtime-date-validation

Conversation

@devmount

@devmount devmount commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Description of the Change

The offtime form now prevents invalid date ranges. The end date is validated to be after the start date (->after('start')) and remains optional for single-day offtimes. When both dates are set and the start date changes, the end date is automatically moved to the day after the new start date. The offtime factory now always generates an end date at least one day after the start, so tests don't randomly fail the new validation. Tests cover the validation, the automatic adjustment and an empty end date staying empty.

Benefits

Offtimes with an end date before or on their start date can no longer be saved, and changing the start date keeps the range valid without editing the end date by hand.

Applicable Issues

Closes #202

@devmount devmount self-assigned this Nov 2, 2026
@devmount
devmount merged commit 5c4746e into main Nov 2, 2026
2 checks passed
@devmount
devmount deleted the enhancements/202-offtime-date-validation branch November 2, 2026 22:23
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.

Improve offtime date input

1 participant