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

223
Views
RNDateTimePicker requires to pass date value. Is it possible to NOT pass a value but a placeholder instead?

My RNDateTimePicker component looks like this:

<RNDateTimePicker
  value={new Date()} // Current date
  mode='date'
  display='default'
  ...
/>

That generates an input field with the current date, and that's fine. But I'm looking to NOT to provide a value but a placeholder UNLESS the user clicks on the Date Input Field and selects a date.

So the input date field would look more or less like this: [MM-DD-YYYY] instead of [9/13/21].

If I were to pass a null value to the value prop of the component it would error out telling me that I must provide a date value.

Is this possible?

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

0

You could create a prop placeholder separeted from the value. The date needs to be valid for a usability purposes indead.

Inside the component you can make something like <input value={isDate ? props.value : '0000-00-00' } placeholder={isDate ? 'any' : 'thing'}>

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!