You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide a minimal reproduction test case with the latest version. This would help a lot 👷.
A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!
@vel-kathir Make sure to move the code you pasted above in a codesandbox template, and ideally edit your issue to remove the wall of code and clarify the issue.
The issue has been inactive for 7 days and has been automatically closed. If you think that it has been incorrectly closed, please reopen it and provide missing information (if any) or continue the last discussion.
Steps to reproduce
shouldDisableDate not working that particular date need to change the background color
const disabledDates = ["15-11-2023", "20-11-2023"];
import React, { useState } from "react";
import Dialog from "@mui/material/Dialog";
import DialogContent from "@mui/material/DialogContent";
import TextField from "@mui/material/TextField";
import Button from "@mui/material/Button";
import { DialogTitle, Divider, IconButton, Box } from "@mui/material";
import CloseIcon from "@mui/icons-material/Close";
import { DemoContainer } from "@mui/x-date-pickers/internals/demo";
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
import { DesktopDatePicker } from "@mui/x-date-pickers";
import dayjs from "dayjs";
import "dayjs/locale/en-gb";
const AddLeaveDialogBox = (props) => {
const {
isAddDialogOpen,
handleClose,
selectedDate,
handleDateChange,
holidayName,
setHolidayName,
handleSave,
dialogBoxLabel,
handleSaveEdit,
} = props;
const [locale, setLocale] = React.useState("en-gb");
const disabledDates = ["15-11-2023", "20-11-2023"];
const renderDay = (date) => {
const formattedDate = dayjs(date).format("DD/MM/YYYY");
console.log(formattedDate, "date", date);
const isDisabled = disabledDates.includes(formattedDate);
};
return (
<DialogTitle
id="customized-dialog-title"
style={{ fontWeight: "600", color: "#565656", fontSize: "15px" }}
>
{dialogBoxLabel}
<IconButton
aria-label="close"
onClick={handleClose}
sx={{
position: "absolute",
right: 8,
top: 8,
color: "#B5B5B5",
borderRadius: "5px",
background: "rgba(88, 88, 88, 0.05)",
}}
>
);
};
export default AddLeaveDialogBox;
Current behavior
No response
Expected behavior
No response
Context
No response
Your environment
No response
Search keywords: 1
The text was updated successfully, but these errors were encountered: