от до для рейнж

This commit is contained in:
Nastya 2024-10-26 19:11:22 +03:00
parent c7ac1dbc93
commit 8949585201
2 changed files with 49 additions and 42 deletions

@ -5,7 +5,7 @@ import { DateCalendar } from "@mui/x-date-pickers";
import { quizThemes } from "@utils/themes/Publication/themePublication";
import type { Moment } from "moment";
import moment from "moment";
import { Paper, useTheme } from "@mui/material";
import { Box, Paper, TextField, useTheme } from "@mui/material";
import { useRootContainerSize } from "@/contexts/RootContainerWidthContext";
type DateProps = {
@ -46,8 +46,11 @@ export default ({ currentQuestion }: DateProps) => {
display: "inline-flex",
flexWrap: "wrap",
marginTop: "20px",
p: "20px",
}}
>
<Box>
<span style={{ marginLeft: "25px", color: theme.palette.text.primary }}>От</span>
<DateCalendar
sx={{
"& .MuiInputBase-root": {
@ -68,6 +71,9 @@ export default ({ currentQuestion }: DateProps) => {
value={currentFrom}
onChange={(data) => onDateChange(data, 0)}
/>
</Box>
<Box>
<span style={{ marginLeft: "25px", color: theme.palette.text.primary }}>До</span>
<DateCalendar
sx={{
"& .MuiInputBase-root": {
@ -88,6 +94,7 @@ export default ({ currentQuestion }: DateProps) => {
value={currentTo}
onChange={(data) => onDateChange(data, 1)}
/>
</Box>
</Paper>
);
};

@ -28,7 +28,7 @@ export const Images = ({ currentQuestion }: ImagesProps) => {
{currentQuestion.title}
</Typography>
<RadioGroup
name={currentQuestion.id}
name={currentQuestion.id.toString()}
value={currentQuestion.content.variants.findIndex(({ id }) => answer === id)}
sx={{
display: "flex",