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

181
Views
Time and Date picker type='datetime-local'

I have two text-field html elements to pick start and end date/time respectively. How to make start date/time less than end date/time?

<v-text-field
  id="setTime"
  outlined
  type="datetime-local"
  label="Start time"
  v-model="plan.start"
>
</v-text-field>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

first, disable end date/time conditional if there is no start date/time it must be disabled. after that when user select start date/time then on validation check if end date/time is lessThan start date/time return error, also, you can disable days lessThan start day/time in end date/time field (read your date/time picker library document)

you can use yup for validation date-time or do it manually:

if your date/time is in epoch format it's like this

const schema = yup.object({
  fromDate: yup.number().required(),
  toDate: yup.number().moreThan(yup.ref("fromDate")).required(),
});

I hope it help you

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!