fragaria / angular-daterangepicker

Angular.js wrapper for dangrossman/bootstrap-daterangepicker
MIT License
519 stars 371 forks source link

minEndDate option? #118

Closed wesley3523 closed 5 years ago

wesley3523 commented 8 years ago

Is it possible to have a min enddate? I want my enddate always to start 9 days after my startdate

i appreciate it.

raygerrard commented 8 years ago

Try having a function return your max date:

<input date-range-picker type="text" ng-model="date" max="addDays(date, 9)" />
wesley3523 commented 8 years ago

Thanks for the reply and example. This is not what i mean. What i want is; For example if i set my startdate to 1 november 2015 i want my enddate to start from 9 november 2015. Some kind of minimum amount between 2 dates.

Awaiting for response

i appreciate it.

raygerrard commented 8 years ago

This is outside the scope of angular-daterangepicker. The bootstrap-daterangepicker plugin doesn't support this feature, it allows you to limit the number of days after the startDate but no support to prevent until after X days.

Might be worth putting in a feature request or implementing yourself and creating pull request here:

https://github.com/dangrossman/bootstrap-daterangepicker