Skip to content

fix(arc): date parsing in date picker hotfix - #322

Merged
kguzek merged 2 commits into
mainfrom
fix/date-picker-hotfix
Mar 25, 2026
Merged

fix(arc): date parsing in date picker hotfix#322
kguzek merged 2 commits into
mainfrom
fix/date-picker-hotfix

Conversation

@GTR1701

@GTR1701 GTR1701 commented Mar 25, 2026

Copy link
Copy Markdown
Member

Fixes 500 error in /versions/create and possibly other routes

Copilot AI review requested due to automatic review settings March 25, 2026 22:41
@GTR1701
GTR1701 requested a review from kguzek as a code owner March 25, 2026 22:41
@GTR1701 GTR1701 self-assigned this Mar 25, 2026
@github-actions

Copy link
Copy Markdown

Looks like you did not link an issue to this PR. If this PR completes a task, consider linking it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Hotfix to prevent the ARC date picker from breaking when it receives an unparsable date string, ensuring the UI safely treats invalid values as empty.

Changes:

  • Add date-fns/isValid guard so invalid parsed dates become null in DatePicker.
  • Minor refactor/rename of getRoundedDate parameter and signature formatting.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/components/inputs/date-picker.tsx Guards against invalid parsed dates to avoid formatting/selection errors.
src/utils/get-rounded-date.ts Renames the hours parameter and tightens the function signature formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/inputs/date-picker.tsx
Comment thread src/utils/get-rounded-date.ts
@kguzek kguzek linked an issue Mar 25, 2026 that may be closed by this pull request
Copilot AI review requested due to automatic review settings March 25, 2026 23:22
@kguzek
kguzek force-pushed the fix/date-picker-hotfix branch from 1510dac to f60d8da Compare March 25, 2026 23:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/utils/get-rounded-date.ts
Comment thread src/components/inputs/date-picker.tsx
@kguzek
kguzek merged commit ac43345 into main Mar 25, 2026
12 checks passed
@kguzek
kguzek deleted the fix/date-picker-hotfix branch March 25, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

naprawić 500 w /versions/create

3 participants