diff --git a/apps/portal/src/components/questions/forms/ContributeQuestionForm.tsx b/apps/portal/src/components/questions/forms/ContributeQuestionForm.tsx index c69cf81c..02ac6647 100644 --- a/apps/portal/src/components/questions/forms/ContributeQuestionForm.tsx +++ b/apps/portal/src/components/questions/forms/ContributeQuestionForm.tsx @@ -151,7 +151,9 @@ export default function ContributeQuestionForm({ }} yearRequired={true} onChange={({ month, year }) => { - field.onChange(startOfMonth(new Date(year!, month! - 1))); + field.onChange( + new Date(Date.UTC(year!, month! - 1, 1, 0, 0, 0, 0)), + ); }} /> )} @@ -266,18 +268,13 @@ export default function ContributeQuestionForm({ />
- + + variant="primary" + />
diff --git a/apps/portal/src/components/questions/forms/CreateQuestionEncounterForm.tsx b/apps/portal/src/components/questions/forms/CreateQuestionEncounterForm.tsx index f158ede5..7519f06c 100644 --- a/apps/portal/src/components/questions/forms/CreateQuestionEncounterForm.tsx +++ b/apps/portal/src/components/questions/forms/CreateQuestionEncounterForm.tsx @@ -130,7 +130,7 @@ export default function CreateQuestionEncounterForm({ yearLabel="" onChange={(value) => { setSelectedDate( - startOfMonth(new Date(value.year!, value.month! - 1)), + new Date(Date.UTC(value.year!, value.month! - 1, 1, 0, 0, 0, 0)), ); }} />