angular-datepicker icon indicating copy to clipboard operation
angular-datepicker copied to clipboard

minDate and maxDate inputs not greying dates out for directive implementation

Open matrixengine opened this issue 2 years ago • 1 comments
trafficstars

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" />

matrixengine avatar Jul 19 '23 06:07 matrixengine

Can you please post a stackblitz ?

vlio20 avatar Dec 11 '23 13:12 vlio20