Skip to content

[8440] Issues with Time/Region controllers on Publish For Later#4778

Merged
sumerjabri merged 1 commit intocraftercms:developfrom
jvega190:bugfix/8440
Apr 22, 2026
Merged

[8440] Issues with Time/Region controllers on Publish For Later#4778
sumerjabri merged 1 commit intocraftercms:developfrom
jvega190:bugfix/8440

Conversation

@jvega190
Copy link
Copy Markdown
Member

@jvega190 jvega190 commented Jan 30, 2026

  • Fixed the selector accepting the following input 11/14/2025 hh:mm PM as valid.

craftercms/craftercms#8440

Summary by CodeRabbit

  • Bug Fixes
    • Improved date/time/timezone picker to prevent redundant updates and ensure only valid, substantive changes are processed.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 30, 2026

Walkthrough

The PR modifies the handleChange function in DateTimeTimezonePicker.tsx to validate and compare new date values before updating state. It adds a guard that checks if the new value is valid and differs from the current date's ISO string representation before invoking state updates.

Changes

Cohort / File(s) Summary
DateTime Picker Logic
ui/app/src/components/DateTimeTimezonePicker/DateTimeTimezonePicker.tsx
Modified handleChange to guard setSelectedDate with validity check and ISO string difference comparison, preventing unnecessary updates from duplicate or invalid values.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related issues

Suggested reviewers

  • rart
  • sumerjabri
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly references the issue number [8440] and summarizes the main change involving Time/Region controllers, which aligns with the bugfix for the datetime picker validation logic.
Description check ✅ Passed The description includes a clear fix summary and references the GitHub issue, meeting the template requirements of ticket reference or full description of what's in the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@jvega190 jvega190 marked this pull request as ready for review January 30, 2026 18:31
@jvega190 jvega190 requested a review from rart as a code owner January 30, 2026 18:31
@sumerjabri sumerjabri merged commit 6b4aa70 into craftercms:develop Apr 22, 2026
3 of 4 checks passed
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.

3 participants