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

337
Views
How to change formik <Field/> component's placeholder?

Basically I'm not able to make date input empty with Formik. I just want it to show nothing initially. This is what I've been dealing for hours.

 <Field
 name="date"
 type="date"
   className={`InformationForm__field text-[20px] lg:h-14 px-4 lg:py-4 py-3  outline- none 
                                           `}
                                            />

note: I've tried placeholder, giving empty string as initial value etc.

Anyone have idea?

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

0

Yo can try below code

     <Field
       name="date"
       render={({ field, form: { isSubmitting } }) => (
           <input {...field} type="date" 
            placeholder="date" />
       )}
     />

Check this link for more info:- https://formik.org/docs/api/field#render

about 4 years ago · Juan Pablo Isaza Report

0

Searching on docs I've found this prop initialValues, try that one.

Reference

about 4 years ago · Juan Pablo Isaza Report

0

You can try this

 <Field
  name="date"
  type="date"
  placeholder=""
  className={`InformationForm__field text-[20px] lg:h-14 px-4 lg:py-4 py-3  outline- none`}
 />

Check this: Formik docs

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!