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

interface IStaticDatePicker {
   disabled:boolean,
   date: Date,
   changeDate: React.Dispatch<React.SetStateAction<any>>,
   handleOnOpen: () => void
}

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

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

export default StaticDatePicker;