StartEndDate Plugin
Ensures a start date field is on or before an end date field. Automatically cross-revalidates both fields when either changes.
Options
| Option | Type | Description |
|---|---|---|
format | string | Date format string. Supported tokens: YYYY, MM, DD. Separator: - or /. |
startDate.field | string | Name of the start date field |
startDate.message | string | Error message shown on the start field when start > end |
endDate.field | string | Name of the end date field |
endDate.message | string | Error message shown on the end field when end < start |
Supported formats
| Format | Example |
|---|---|
YYYY-MM-DD | 2025-12-31 |
DD/MM/YYYY | 31/12/2025 |
MM/DD/YYYY | 12/31/2025 |
YYYY/MM/DD | 2025/12/31 |
Playground
Notes
- Cross-revalidation is automatic: when either field changes and validates, the other is revalidated immediately.
- If either field is empty, the constraint is not applied (defers to
notEmptyordatevalidators). - Invalid calendar dates (e.g. February 30) are treated as unparseable — the cross-field constraint is skipped.
- Equal dates are valid (inclusive comparison: start ≤ end).
- Multiple
StartEndDateinstances on the same form are supported (each instance has a unique internal key).