Uh oh!
There was an error while loading. Please reload this page.
feat(events): autofill and bound End Date from Start Date - #315
Merged
Conversation
Setting Start Date now fills an empty End Date with the same value, and pulls End Date forward (with an alert) if it would fall before the start. The End Date picker also gets a minDate so earlier dates aren't offered. min_date on the docfield is only read when the control builds its picker, so the limit has to be pushed onto the datepicker instance directly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Greptile SummaryAdds client-side handling that synchronizes and bounds an event’s End Date when its Start Date changes.
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code failure identified. The new handler preserves existing non-empty valid End Dates, corrects invalid ranges, and refreshes the picker constraint while retaining server-side validation.
|
| Filename | Overview |
|---|---|
| buzz/events/doctype/buzz_event/buzz_event.js | Adds Start Date-driven End Date synchronization and updates the End Date picker’s minimum selectable date; no concrete defect was established. |
Reviews (1): Last reviewed commit: "feat(events): autofill and bound End Dat..." | Re-trigger Greptile
Uh oh!
There was an error while loading. Please reload this page.
Contributor
Successfully created backport PR for |
harshtandiya added a commit
that referenced
this pull request
Aug 3, 2026
feat(events): autofill and bound End Date from Start Date (#315) Setting Start Date now fills an empty End Date with the same value, and pulls End Date forward (with an alert) if it would fall before the start. The End Date picker also gets a minDate so earlier dates aren't offered. min_date on the docfield is only read when the control builds its picker, so the limit has to be pushed onto the datepicker instance directly. (cherry picked from commit 73c1f58) Co-authored-by: Harsh Tandiya <harsh.tandiya@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Picking a Start Date on Buzz Event left End Date entirely on the user, and nothing stopped them from putting it before the start. The server caught that on save via
validate_from_to_dates, but only after a full round trip.Three small things in
buzz_event.js:minDate, so earlier dates aren't offered in the first place.Gotchas worth knowing:
min_dateon the docfield is only read once, when the control builds its picker —set_df_propertydoes nothing after that. The limit has to go onto the datepicker instance directly (field.datepicker.update({ minDate })), same asfrappe/form/reminders.jsdoes. Hence theset_end_date_limithelper, called from bothrefreshandstart_date.minDateis inclusive, so end == start is still allowed. It has to be — single-day events are the common case and the autofill produces exactly that.Dates are
YYYY-MM-DDstrings, so the<comparison is chronological. No date lib needed.Not changed:
validate_datesalready callsvalidate_from_to_dates("start_date", "end_date"); this is a UX layer on top, not a replacement.validate_scheduleuntouched. Pulling End Date forward can now strand schedule rows past it — the server already throws on those, which is the right place for it.Desk-only change, no dashboard impact.