Skip to content

[Portal] Add time picker to Audit Log custom date range dialog - #5831

Draft
jimmycwc wants to merge 6 commits into
authgear:mainfrom
jimmycwc:ui-auditlog
Draft

[Portal] Add time picker to Audit Log custom date range dialog#5831
jimmycwc wants to merge 6 commits into
authgear:mainfrom
jimmycwc:ui-auditlog

Conversation

@jimmycwc

@jimmycwc jimmycwc commented Jul 22, 2026

Copy link
Copy Markdown
截圖 2026-07-22 18 38 29

Summary

  • Switch audit log (and user details logs) custom date range to use DateRangeDialog + DateTimePicker with time picking enabled, storing full ISO datetime in URL instead of yyyy-MM-dd
  • Change DateTimePicker time display and parsing from 24-hour to 12-hour AM/PM, matching Authgear's existing datetime display conventions
  • Fix two end-bound bugs: legacy yyyy-MM-dd to bookmarks now parse as end-of-day (inclusive), and selecting an end date for the first time defaults to 23:59:59 instead of 00:00:00
  • Add customRangeLabel to AuditLogFilterBar so the selected date/time range is shown in the filter button
  • Clarify i18n labels to "Start Date & Time" / "End Date & Time" for screens with time picking; keep "Start Date" / "End Date" for Analytics (date-only)
  • Hardcode en-US in formatCustomDateRangeLabel so filter labels match the AM/PM display in the picker

Test plan

  • Open Audit Log → Custom Date Range → verify time picker shows 12-hour AM/PM (e.g. "2:30 PM")
  • Pick a start and end date without touching the time — verify start defaults to 12:00 AM and end defaults to 11:59 PM
  • Load a legacy URL with from=2026-07-01&to=2026-07-21 — verify it is interpreted as Jul 1 00:00 AM → Jul 21 11:59 PM (whole days inclusive)
  • Verify filter button shows the selected range label in AM/PM format after applying
  • Verify Analytics date range dialog still shows "Start Date" / "End Date" (not "& Time")
  • Verify Fraud Protection logs date range dialog shows "Start Date & Time" / "End Date & Time"

Made with Cursor

jimmycwc and others added 6 commits July 21, 2026 14:49
Match Fraud Protection Logs by enabling DateRangeDialog time
picker, storing datetime in the URL, and showing the selected
range label in the filter dropdown.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use end-of-day for rangeTo defaults and legacy yyyy-MM-dd
bookmarks so exclusive backend bounds keep the selected day
inclusive.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align the time select with Authgear datetime display instead of
24-hour clock.

Co-authored-by: Cursor <cursoragent@cursor.com>
Update audit log and fraud protection dialog copy for datetime
pickers, and give Analytics its own date-only labels.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep filter labels consistent with DateTimePicker display format.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy the start picker's time onto the end date when no time is set yet,
round clamped times down to a dropdown increment, and format AM/PM
manually so Chinese locales do not show 上午/下午.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimmycwc

Copy link
Copy Markdown
Author

@tung2744 Added a time picker to Audit Log and verified the changes using the review-pr.

@jimmycwc
jimmycwc marked this pull request as draft July 27, 2026 08:16
@jimmycwc jimmycwc changed the title [Portal] Use 12-hour AM/PM format in audit log date range [Portal] Add time picker to Audit Log custom date range dialog Jul 31, 2026
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