Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

145
Views
How to add helper text in date field in material UI?

This is my component definition:

<DateField
      name={formElement.name}
      type="date"
      label={formElement.name}
      onChange={(date) => formik.setFieldValue(formElement.name, date)}
      value={formik.values[formElement.name] || null}
      onBlur={blurHandler}
      className={classes.flexGrow}
      // defaultValue={dataMatchHandler(formElement.name) || ''}
      minDate={doj}
      maxDate={Date('1/1/2023')}
      error={formik.touched[formElement.name] && Boolean(formik.errors[formElement.name])}
      helperText={formik.touched[formElement.name] && formik.errors[formElement.name]}
/>

Now when the value changes to below minDate error is triggered fine, but I also want to display a helper text, how do I do that?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

My suggestion is that you can try using TextField so you can use helperText.

Here is the example you can try:

<TextField
      name={formElement.name}
      type="date"
      label={formElement.name}
      onChange={(date) => formik.setFieldValue(formElement.name, date)}
      value={formik.values[formElement.name] || null}
      onBlur={blurHandler}
      className={classes.flexGrow}
      helperText={formik.touched[formElement.name] && formik.errors[formElement.name]}
    />

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!