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

148
Vistas
how to automatically get date in specific format from DatePicker?

I'm using the component DatePicker from antd.

I have currently a Form from antd, in which there's a Form.Item, in which I put the DatePicker.

I want the Form.Item to be given the date in a specific format, lets say YYYY-MM-DD, is there a way to do that?

by giving it the prop format I can choose how it will look like in the UI but I'm trying to make it send back the value by the same format.

I've tried giving it a dateFormat prop with the function

function dateFormat(date) {
  return moment(date).format("YYYY/MM/DD");
}

but it doesn't work.

is there a way to do this manipulating the data in the onChange function?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

so apparently there's no way to do it in the props, I've checked and so has @MoaazBhnas.

If anyone somehow finds a way, I'll be looking forward to hear!

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