angular-datepicker
angular-datepicker copied to clipboard
minDate and maxDate inputs not greying dates out for directive implementation
When working with a Directive implementation, minDate and maxDate inputs are not working (to grey out dates) and only possible with min/max properties in IDatePickerDirectiveConfig. But there is no easy way to update the config on the fly without having a config for every single input.
Use case:
Looking to use in a situation where there are many sets of start and end dates on the same screen. When a start date is selected, the corresponding end date would be set with minDate of the selected start date and visa versa, when the end date is selected the corresponding start date would be set with maxDate of the selected end date.
<input name="start_date_1" [(ngModel)]="startDate1" [dpDayPicker]="config" /> <input name="end_date_1" [(ngModel)]="endDate1" [dpDayPicker]="config" />
<input name="start_date_2" [(ngModel)]="startDate2" [dpDayPicker]="config" /> <input name="end_date_2" [(ngModel)]="endDate2" [dpDayPicker]="config" />
Can you please post a stackblitz ?