Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minDate and maxDate inputs not greying dates out for directive implementation #633

Open
matrixengine opened this issue Jul 19, 2023 · 1 comment

Comments

@matrixengine
Copy link

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

@vlio20
Copy link
Owner

vlio20 commented Dec 11, 2023

Can you please post a stackblitz ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants