GeezerVison is showing github.com — Preserve explicit 24-hour mode in date-time picker popups. #10584 by MaybeSomeone-arc18 · Pull Request #10596 · pgadmin-org/pgadmin4
Conversation
Fixes #10584.
The truthiness check turned ampm: false into undefined, so MUI used the locale's default clock mode instead. Forward the value directly: false stays false, true stays true, and an omitted setting stays undefined.
Added nine regression cases for Date, Time and DateTime pickers with false, true and an omitted setting. On unchanged master the three false cases fail; with the fix all 61 tests pass across this suite and the existing FormComponents suite.
Also built a local component harness using the actual InputDateTimePicker, pgAdmin theme and MUI pickers. In Chrome with en-US locale, both Time and DateTime popups show 24-hour columns without AM/PM when ampm is false. This was component-level verification, not a full pgAdmin end-to-end run. ESLint could not run with the available dependencies because its config loader errors before linting.
AI assistance was used for the patch and tests.
Summary by CodeRabbit
- Bug Fixes
- Date, time, and date-time pickers now consistently respect the configured AM/PM setting, including when it is disabled or unspecified.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 15, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Repository: pgadmin-org/pgadmin4/.coderabbit.yaml
- Review profile: CHILL
- Plan: Advanced
- Run ID:
94b34473-173e-4d56-af18-f18655a11344
📥 Commits
-
Reviewing files that changed from the base of the PR and between 607c9ec and d402fc6.
📒 Files selected for processing: 2
-
web/pgadmin/static/js/components/FormComponents.jsx
web/regression/javascript/components/InputDateTimePicker.spec.js
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
Walkthrough
InputDateTimePicker now forwards the ampm setting unchanged to its picker components. Tests cover false, true, and undefined.
Changes
Date-time picker AM/PM setting
| Layer / File(s) |
Summary |
Forward the setting and verify picker props web/pgadmin/static/js/components/FormComponents.jsx, web/regression/javascript/components/InputDateTimePicker.spec.js |
InputDateTimePicker now forwards controlProps.ampm without converting false to undefined. Tests verify that Date, Time, and DateTime picker components receive false, true, and undefined unchanged. |
Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers: dpage
Merge Risk: ⚪ Minimal · up to d402f
-
The picker change appears ready to merge after normal checks; no outstanding issue is identified.
Pre-merge checks: 4 · 1
-
Failed checks: 1 warning
| Check name |
Status |
Explanation |
Resolution |
| Docstring Coverage |
 |
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. |
Write docstrings for the functions missing them to satisfy the coverage threshold. |
Passed checks: 4 passed
-
| Check name |
Status |
Explanation |
| Description Check |
 |
Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check |
 |
The title clearly describes the main change: preserving explicit 24-hour mode in date-time picker popups. |
| Linked Issues check |
 |
Issue #10584 requires InputDateTimePicker and its FormInputDateTimePicker wrapper to preserve controlProps.ampm, including explicit false, while leaving an omitted value undefined. At the revi… |
| Out of Scope Changes check |
 |
The reviewed changes are limited to the ampm forwarding fix in FormComponents.jsx and regression tests for the three picker types and three supported value states. The tests directly verify the be… |
- Fix all pre-merge checks with AI
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks! Merged as 5063c76, with two small fixes folded in: the unused React import in the new spec (it failed ESLint), and ampm is no longer forwarded to the Date picker, since DatePicker has no clock and passes the prop through to the DOM, which made React log a non-boolean attribute error for the debugger's Date fields. The Date test cases now assert that ampm is omitted.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|