Does any one know how to get only the year using the Textfield type date in react?
<TextField
key={"input-year"}
InputLabelProps={{ shrink: true }}
required
fullWidth
variant="outlined"
type="date"
label="Year"
margin="dense"
onChange={handleChange}
value={formValues?.year}
/>
I updated the code according to requirement. Please check
You can manage year logic according to your requirement.