text: import React from 'react';
  import TextField from '@mui/material/TextField';
  import AdapterDateFns from '@mui/lab/AdapterDateFns';
  import LocalizationProvider from '@mui/lab/LocalizationProvider';
  import DatePicker from '@mui/lab/DatePicker';
  import Stack from '@mui/material/Stack';
  import Button from '@mui/material/Button';
  
  
  function Edate() {
      const [value, setValue] = React.useState(new Date());
  
      return <div className='button margin'>
          <LocalizationProvider dateAdapter={AdapterDateFns}>
              <Stack spacing={3}>
                  <DatePicker
                      disableFuture
                      label="Edit Date"
                      openTo="year"
                      views={['year', 'month', 'day']}
                      value={value}
                      onChange={(newValue) => {
                          setValue(newValue);
                      }}
                      renderInput={(params) => <TextField {...params} />}
                  />
              </Stack>
          </LocalizationProvider>
          <Button variant="text">Calculate</Button>
      </div>;
  }
  
  export default Edate;
  