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

253
Views
Establecer tiempo predeterminado en Flatpickr menos 1 mes

Tengo este código que uso en la aplicación React.

 <Flatpickr options={{ enableTime: true, dateFormat: "Ymd H:i", }} id="fromDate" value={dateFrom.getTime() === 0 ? '' : dateFrom} onChange={([date]) => { setDateFrom(date); }} />

¿Cómo puedo configurar la hora predeterminada 1 mes antes de la hora actual cuando se carga la página?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

En los documentos oficiales , puede ver que hay una opción llamada "fecha predeterminada", puede configurarla usando un momento así:

 const defaultDate = moment().add(-30, 'days').toDate(); // ... <Flatpickr // ... options={{ defaultDate: defaultDate, // ... }} />
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!