question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Date range validation

See original GitHub issue

I’m building a date range picker with two date inputs and I’d like to validate that the end date does not come before the start date and the start is not after the end. It would be cool if I could somehow dynamically set the min and max based on other fields in the form or even have some way to set that via useValidatedInput/Field/etc. so I can control the state myself with whatever I need and just pass what those validation values should be dynamically.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
brophdawg11commented, Oct 29, 2022

@kentcdodds that’s an interesting idea, I moved that over to https://github.com/brophdawg11/remix-validity-state/discussions/24 to think through it in some more detail 👍

0reactions
kentcdoddscommented, Oct 21, 2022

Feel free to ignore this, but when I was maintaining angular-formly, I got several folks asking for https://json-schema.org/ support. I couldn’t do it because I was too far down the road, but something to think about at this early stage maybe.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Validating date range - FormValidation
The following form asks you to enter a date in the range of 2000/01/01 and 2020/12/30. It can be implemented by using the...
Read more >
Javascript - date range validation - Stack Overflow
i've a form user can enter any date , but i want to set a date range validation . for example: from 1-12-2012...
Read more >
Use Excel Data Validation for Entering Dates - Contextures
On any sheet in the workbook, type "StartDate" in one cell, and type "EndDate" in the cell below. In the cells to the...
Read more >
Javascript Data Type How to - Check date range validation
We would like to know how to check date range validation. Answer. <!DOCTYPE html> <html> ...
Read more >
Validate Date Range (From - To). · GitHub
Validate Date Range (From - To). Raw. date-range-validation.js ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found