Calendar flexibility in selecting specialDates/disabledDates #12105
Replies: 7 comments
|
So are you suggesting we introduce new enumeration for all the cases you've listed? In total that would be 6 new entries. Another approach would be to introduce a second parameter to the WEEKENDS and WEEKDAYS members to specify the constraint. |
That's what I though too. The second constraint can be passed even now and is ignored, if type is this.calendar.disabledDates = [
{ type: DateRangeType.Weekends, dateRange: range },
];
this.calendar.specialDates= [
{ type: DateRangeType.Weekdays, dateRange: range },
];and no changes in the API are needed, just implementation changes. |
|
Extending the enum would be cleaner in terms of usage in the component after. Second parameter would mean passing another DateRangeDescriptor inside, but then using only BEFORE, AFTER and BETWEEN from it. We can't disallow passing the rest. You will have then cases inside the WEEKEND and WEEKDAY cases, which will bloat the code IMO. |
That would mean to add two new enums to the already available, to serve for the last cases suggested - weekends/weekdays AFTER/BEFORE a date, right? |
|
There has been no recent activity and this issue has been marked inactive. |
|
@hanastasov This never reached development, or did we not associate it with the issue? |
|
Never reached development, that's why there is also no PR associated. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Question
The
DateRangeDescriptorclass provides means to configure dates selection in following ways:Why not being able to specify the following as well:
The above seems to require no API changes and only implementation changes to respect the range provided:
Those two seem to require API changes, maybe passing a second type constraint:
but seems to bring complexity that is not worth to handle I think.
All reactions