Skip to content

Commit 236120b

Browse files
committed
Merge branch 'main' into update-react-router-7.1.1
2 parents a4097a5 + db02d14 commit 236120b

9 files changed

Lines changed: 200 additions & 187 deletions

File tree

package-lock.json

Lines changed: 21 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
"@mui/material": "^6.3.0",
1010
"@mui/x-date-pickers": "^7.23.1",
1111
"@reduxjs/toolkit": "^2.5.0",
12-
"@types/dompurify": "^3.0.5",
12+
"@types/dompurify": "^3.2.0",
1313
"array-move": "^4.0.0",
1414
"axios": "^1.7.9",
1515
"bourbon": "^7.3.0",
1616
"classnames": "^2.5.1",
1717
"date-fns": "^3.6.0",
18-
"dompurify": "^3.1.7",
18+
"dompurify": "^3.2.3",
1919
"font-awesome": "^4.7.0",
2020
"formik": "^2.4.6",
2121
"http-proxy-middleware": "^3.0.3",
2222
"i18next": "^24.2.0",
2323
"i18next-browser-languagedetector": "^8.0.2",
24-
"i18next-http-backend": "^2.6.1",
24+
"i18next-http-backend": "^3.0.1",
2525
"lodash": "^4.17.21",
2626
"moment": "^2.30.1",
2727
"moment-timezone": "^0.5.46",

src/components/events/partials/ModalTabsAndPages/EventDetailsSchedulingTab.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useEffect } from "react";
22
import cn from "classnames";
33
import _ from "lodash";
4-
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
4+
import DatePicker from "react-datepicker";
55
import { Formik, FormikErrors, FormikProps } from "formik";
66
import { Field } from "../../../shared/Field";
77
import Notifications from "../../../shared/Notifications";
@@ -195,12 +195,12 @@ const EventDetailsSchedulingTab = ({
195195
: [];
196196

197197
return {
198-
scheduleStartDate: startDate.setHours(0, 0, 0).toString(),
198+
scheduleStartDate: startDate.toString(),
199199
scheduleStartHour: source.start.hour != null ? makeTwoDigits(source.start.hour) : "",
200200
scheduleStartMinute: source.start.minute != null ? makeTwoDigits(source.start.minute) : "",
201201
scheduleDurationHours: source.duration.hour != null ? makeTwoDigits(source.duration.hour) : "",
202202
scheduleDurationMinutes: source.duration.minute != null ? makeTwoDigits(source.duration.minute): "",
203-
scheduleEndDate: endDate.setHours(0, 0, 0).toString(),
203+
scheduleEndDate: endDate.toString(),
204204
scheduleEndHour: source.end.hour != null ? makeTwoDigits(source.end.hour): "",
205205
scheduleEndMinute: source.end.minute != null ? makeTwoDigits(source.end.minute): "",
206206
captureAgent: source.device.name,
@@ -286,8 +286,7 @@ const EventDetailsSchedulingTab = ({
286286
/* date picker for start date */
287287
<DatePicker
288288
name="scheduleStartDate"
289-
// tabIndex={1}
290-
value={new Date(formik.values.scheduleStartDate)}
289+
selected={new Date(formik.values.scheduleStartDate)}
291290
onChange={(value: Date | null) =>
292291
value && changeStartDate(
293292
value,
@@ -297,6 +296,14 @@ const EventDetailsSchedulingTab = ({
297296
checkConflictsWrapper
298297
)
299298
}
299+
showYearDropdown
300+
showMonthDropdown
301+
yearDropdownItemNumber={2}
302+
dateFormat="P"
303+
popperClassName="datepicker-custom"
304+
className="datepicker-custom-input"
305+
portalId="root"
306+
locale={currentLanguage?.dateLocale}
300307
/>
301308
) : (
302309
<>

src/components/events/partials/ModalTabsAndPages/NewSourcePage.tsx

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";
22
import { useTranslation } from "react-i18next";
33
import cn from "classnames";
44
import Notifications from "../../../shared/Notifications";
5-
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
5+
import DatePicker from "react-datepicker";
66
import {
77
getCurrentLanguageInformation,
88
getTimezoneOffset,
@@ -444,7 +444,7 @@ const Schedule = <T extends {
444444
<td>
445445
<DatePicker
446446
name="scheduleStartDate"
447-
value={typeof formik.values.scheduleStartDate === "string" ? parseISO(formik.values.scheduleStartDate): formik.values.scheduleStartDate}
447+
selected={typeof formik.values.scheduleStartDate === "string" ? parseISO(formik.values.scheduleStartDate): formik.values.scheduleStartDate}
448448
onChange={(value) => {
449449
if (formik.values.sourceMode === "SCHEDULE_MULTIPLE") {
450450
value && changeStartDateMultiple(
@@ -460,6 +460,14 @@ const Schedule = <T extends {
460460
);
461461
}
462462
}}
463+
showYearDropdown
464+
showMonthDropdown
465+
yearDropdownItemNumber={2}
466+
dateFormat="P"
467+
popperClassName="datepicker-custom"
468+
className="datepicker-custom-input"
469+
portalId="root"
470+
locale={currentLanguage?.dateLocale}
463471
/>
464472
</td>
465473
</tr>
@@ -474,14 +482,22 @@ const Schedule = <T extends {
474482
<td>
475483
<DatePicker
476484
name="scheduleEndDate"
477-
value={typeof formik.values.scheduleEndDate === "string" ? parseISO(formik.values.scheduleEndDate) : formik.values.scheduleEndDate}
485+
selected={typeof formik.values.scheduleEndDate === "string" ? parseISO(formik.values.scheduleEndDate) : formik.values.scheduleEndDate}
478486
onChange={(value) =>
479487
value && changeEndDateMultiple(
480488
value,
481489
formik.values,
482490
formik.setFieldValue
483491
)
484492
}
493+
showYearDropdown
494+
showMonthDropdown
495+
yearDropdownItemNumber={2}
496+
dateFormat="P"
497+
popperClassName="datepicker-custom"
498+
className="datepicker-custom-input"
499+
portalId="root"
500+
locale={currentLanguage?.dateLocale}
485501
/>
486502
</td>
487503
</tr>

0 commit comments

Comments
 (0)