Skip to content

Commit 6c70f64

Browse files
fix(audit): Fix absolute date picker for audit log view (#95387)
Closes JAVASCRIPT-31S6 There shouldn't be any audit logs older than when the org was created anyway.
1 parent 663e80a commit 6c70f64

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

static/app/views/settings/organizationAuditLog/auditLogList.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import type {DateString} from 'sentry/types/core';
2323
import type {AuditLog, Organization} from 'sentry/types/organization';
2424
import type {User} from 'sentry/types/user';
2525
import {getInternalDate} from 'sentry/utils/dates';
26+
import getDaysSinceDate from 'sentry/utils/getDaysSinceDate';
2627
import useOrganization from 'sentry/utils/useOrganization';
2728
import useProjects from 'sentry/utils/useProjects';
2829
import {useUser} from 'sentry/utils/useUser';
@@ -307,7 +308,7 @@ function AuditLogList({
307308
allTime,
308309
}}
309310
utc={utc}
310-
maxPickableDays={Infinity}
311+
maxPickableDays={getDaysSinceDate(organization.dateCreated)}
311312
trigger={(triggerProps, isOpen) => {
312313
const currentValue = statsPeriod || allTime;
313314
let displayLabel: React.ReactNode;

0 commit comments

Comments
 (0)