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

147
Views
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 answers
Answer question

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 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!