Skip to content

Commit

Permalink
fix(portal): adjust range picker date formatting (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
KsiBart authored Nov 8, 2024
1 parent c0234f3 commit 86a69a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ const EnvironmentActivityLog = () => {
const { requestTime = [] } = values ?? {};
const params = omit(values, ["requestTime"]);
params.requestStartTime = requestTime?.[0]
? dayjs(requestTime[0]).valueOf()
? dayjs(requestTime[0]).startOf("day").valueOf()
: undefined;
params.requestEndTime = requestTime?.[1]
? dayjs(requestTime[1]).valueOf()
? dayjs(requestTime[1]).endOf("day").valueOf()
: undefined;

if (!params.path) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ const DiagramWrapper = ({ envs }: Props) => {
envId: values.envId || params.envId,
buyer: values.buyer || params.buyer,
startTime: requestTime?.[0]
? dayjs(requestTime[0]).format(TIME_ZONE_FORMAT)
? dayjs(requestTime[0]).startOf("day").format(TIME_ZONE_FORMAT)
: currentTime,
endTime: requestTime?.[1]
? dayjs(requestTime[1]).format(TIME_ZONE_FORMAT)
? dayjs(requestTime[1]).endOf("day").format(TIME_ZONE_FORMAT)
: currentTime,
});
},
Expand Down

0 comments on commit 86a69a4

Please sign in to comment.