Skip to content

fix: date range filter validation always allowed invalid ranges - #9566

Draft
okxint wants to merge 2 commits into
makeplane:developfrom
okxint:fix/date-filter-modal-range-validation
Draft

fix: date range filter validation always allowed invalid ranges#9566
okxint wants to merge 2 commits into
makeplane:developfrom
okxint:fix/date-filter-modal-range-validation

Conversation

@okxint

@okxint okxint commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

In date-filter-modal.tsx, date2 was computed from watch("date1") instead of watch("date2"):

const date1 = getDate(watch("date1"));
const date2 = getDate(watch("date1")); // bug: should be "date2"

This made date1 === date2 always true, so date1 > date2 was always false, and isInvalid was always false. The Apply button's disabled={isInvalid} never fired — a user could submit any date range including one where start > end.

Fix: one character — watch("date1")watch("date2").

okxint added 2 commits August 4, 2026 12:03
date2 was computed from watch("date1") instead of watch("date2"),
making date1 === date2 always true and isInvalid always false.
The Apply button disabled prop never fired, so any date range —
including one where start > end — could be submitted.
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c0d792d9-8313-4731-bd67-9abc3365a591

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant