Reputation: 2495
One of the noteworthy changes in Angular 10 was the oft-requested feature of date range selection: https://material.angular.io/components/datepicker/overview#date-range-selection
It enables you to select a start date and an end date in the same picker.
I want to use this input in a form I need, in order to filter records from a database. However, per requirements, I should be able to leave either the start date or the end date unspecified. So, I should be able to cover all the following example scenarios:
Accomplishing case 1 is pretty easy. I'm not sure how to go about accomplishing case 2 and 3.
Can anyone help?
Upvotes: 2
Views: 464
Reputation: 32517
Just conditionally set [min]
and [max]
on related inputs. Setting those on input
elements will effectively limit selection options in the datepicker
Upvotes: 1