Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixes datepicker issue within dataviz (M2-7348) #1987

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const RespondentDataReview = () => {
const datesResult = data?.result;
if (!datesResult) return;

const submitDates = datesResult.dates.map((date: string) => new Date(date));
const submitDates = datesResult.dates.map((date: string) => new Date(`${date}T00:00:00`));
setResponseDates(submitDates);
});

Expand Down Expand Up @@ -233,7 +233,9 @@ export const RespondentDataReview = () => {

const lastActivityCompletedDate = lastActivityCompleted && new Date(lastActivityCompleted);
const selectedDateInParam =
selectedDateParam && isValid(new Date(selectedDateParam)) && new Date(selectedDateParam);
selectedDateParam &&
ramirlm marked this conversation as resolved.
Show resolved Hide resolved
isValid(new Date(`${selectedDateParam}T00:00:00`)) &&
new Date(`${selectedDateParam}T00:00:00`);

if (selectedDateInParam) {
handleSetInitialDate(selectedDateInParam);
Expand Down
Loading