Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

151
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda