i18n
This commit is contained in:
@@ -2,6 +2,7 @@ import { DatePicker, TimeInput } from "@mantine/dates";
|
||||
import { ActionIcon, Stack } from "@mantine/core";
|
||||
import { useRef } from "react";
|
||||
import { ClockIcon } from "@phosphor-icons/react";
|
||||
import { useLingui } from "@lingui/react/macro";
|
||||
|
||||
interface DateTimePickerProps {
|
||||
value: Date | null;
|
||||
@@ -16,6 +17,7 @@ const DateTimePicker = ({
|
||||
label,
|
||||
...rest
|
||||
}: DateTimePickerProps) => {
|
||||
const { t } = useLingui();
|
||||
const timeRef = useRef<HTMLInputElement>(null);
|
||||
const currentDate = value ? new Date(value) : null;
|
||||
|
||||
@@ -73,7 +75,7 @@ const DateTimePicker = ({
|
||||
/>
|
||||
<TimeInput
|
||||
ref={timeRef}
|
||||
label="Time"
|
||||
label={t`Time`}
|
||||
size="md"
|
||||
value={formatTime(currentDate)}
|
||||
onChange={handleTimeChange}
|
||||
|
||||
Reference in New Issue
Block a user