Skip to content

Commit f78465f

Browse files
authored
Fix date selection (#1442)
1 parent af9c16c commit f78465f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

frontend/src/components/modals/tournament_modal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function GeneralTournamentForm({
4646
const { t } = useTranslation();
4747
const form = useForm({
4848
initialValues: {
49-
start_time: new Date(),
49+
start_time: new Date().toISOString(),
5050
name: '',
5151
club_id: null,
5252
dashboard_public: true,
@@ -78,7 +78,7 @@ function GeneralTournamentForm({
7878
values.dashboard_endpoint,
7979
values.players_can_be_in_multiple_teams,
8080
values.auto_assign_courts,
81-
values.start_time.toISOString(),
81+
values.start_time,
8282
values.duration_minutes,
8383
values.margin_minutes
8484
);
@@ -124,7 +124,7 @@ function GeneralTournamentForm({
124124
color="indigo"
125125
leftSection={<IconCalendarTime size="1.1rem" stroke={1.5} />}
126126
onClick={() => {
127-
form.setFieldValue('start_time', new Date());
127+
form.setFieldValue('start_time', new Date().toISOString());
128128
}}
129129
>
130130
{t('now_button')}

0 commit comments

Comments
 (0)