import { DatePicker } from "@mui/x-date-pickers/DatePicker";
import { TextField, Box } from "@mui/material";

const DateFilters = ({
  startDate,
  setStartDate,
  endDate,
  setEndDate,
}: {
  startDate: any;
  setStartDate: any;
  endDate: any;
  setEndDate: any;
}) => {
  return (
    <Box sx={{ display: "flex", gap: 2, my: 2 }}>
      <DatePicker
        label="از تاریخ"
        value={startDate}
        onChange={(newValue) => setStartDate(newValue)}
        slotProps={{ textField: { fullWidth: true } }}
      />
      <DatePicker
        label="تا تاریخ"
        value={endDate}
        onChange={(newValue) => setEndDate(newValue)}
        slotProps={{ textField: { fullWidth: true } }}
      />
    </Box>
  );
};
export default DateFilters;
