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

241
Views
RNDateTimePicker change date format from MM/dd/yy to anything else

how can I change the display format of RNDateTimePicker?

Once click the date, the date picker will pop up, after select, the display date format is "MM/dd/yy". I want to change it to "dd/MM/yyyy" since it is the date format I use on the other screen. I cannot find the solution for now, even on the documentation.

Here the display date

<RNDateTimePicker
    mode="date"
    value={upTargetStartDate}
    minimumDate={new Date()}
    onChangeText={(text) => setUpTargetStartDate(text)}
/>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

According to the documentation, you need to add dateFormat property into your RNDateTimePicker component and pass your desire date's format which in your case is: day month year.

<RNDateTimePicker
  mode="date"
  dataFormat="day month year"    // --------> added here
  value={upTargetStartDate}  
  minimumDate={new Date()}
  onChangeText={(text) =>
  setUpTargetStartDate(text)
  }
/>

You can also change the format with simple javascript's methods:

const wrongFormat = "12/20/21"

const [month, day, year] = wrongFormat.split("/")

const correctFormat = `${day}/${month}/${year}`

console.log(correctFormat)

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!