A JavaScript component that is a date & time range picker, no need to build, no dependencies except Moment.js, that is based on Dan Grossman's bootstrap-daterangepicker.
Is there a way to start the datetime picker to be from 2023-01-01 to 2023-03-09 and then stop someone from selecting older than 2023-03-10, but they should still be able to select say from 2010 to 2015 as an example, but currently the To Year is stuck at 2023.
After posting this, I realized that it does actually work fine. I just need to select a From date older than 2023 first and then my To Date goes back further than 2023.
Can someone maybe help me and explain why my To year is stuck at 2023. I'd like it to be max up to 2023 and min from 2000.
Here's my From which works like it should:
And then my To which only shows 2023:
Here's my code:
Is there a way to start the datetime picker to be from
2023-01-01
to2023-03-09
and then stop someone from selecting older than2023-03-10
, but they should still be able to select say from 2010 to 2015 as an example, but currently the To Year is stuck at 2023.What's the correct way to do this?