Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

221
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda