valor-software / ngx-bootstrap

Fast and reliable Bootstrap widgets in Angular (supports Ivy engine)
https://valor-software.com/ngx-bootstrap
MIT License
5.52k stars 1.69k forks source link

Select minimum range in ngx bootstrap date range picker #6438

Open AshwinVoiro opened 2 years ago

AshwinVoiro commented 2 years ago

I can see that there is a property called maxDateRange to restrict to not be able to select more than that after selecting first date. But I dont see an option like minDateRange to restrict to select only after certain days after selecting first date.

Eg: minDateRange - 5. The user selected 6th March 2022 as first date then the next 5 days should be disabled and the user should be able to select dates past 11th March 2022.

Currently as an alternative, I am letting my user select the date and show validation if the difference is less than 5 days. It would be really great to have this feature as I have this scenario in a lot of places with different minimum range. Thanks.

swapnil0545 commented 11 months ago

I can see that there is a property called maxDateRange to restrict to not be able to select more than that after selecting first date. But I dont see an option like minDateRange to restrict to select only after certain days after selecting first date.

Eg: minDateRange - 5. The user selected 6th March 2022 as first date then the next 5 days should be disabled and the user should be able to select dates past 11th March 2022.

Currently as an alternative, I am letting my user select the date and show validation if the difference is less than 5 days. It would be really great to have this feature as I have this scenario in a lot of places with different minimum range. Thanks.

+1 for the feature request.