import { DatePicker } from "@material-ui/pickers";
import { makeStyles } from '@material-ui/core'

interface IStaticDatePicker {
   disabled:boolean,
   date: Date,
   changeDate: React.Dispatch<React.SetStateAction<any>>,
}

const useStyles = makeStyles({
    container: {
        position: 'absolute',
        left: 1369,
        top:1,
        width: 30,
        cursor: 'pointer',
    }
})

const StaticDatePicker = ({ disabled, date, changeDate }: IStaticDatePicker) => {
    const classes = useStyles()
return (
    <DatePicker
        disabled={disabled}
        className={classes.container}
        autoOk
        inputVariant='outlined'
        orientation="portrait"
        variant="dialog"
        openTo="date"
        value={date}
        onChange={changeDate}
        />
  );
};

export default StaticDatePicker;