I saw this example in the official website of angular material
https://stackblitz.com/angular/xxjleavorkm?file=src%2Fapp%2Fdatepicker-date-class-example.ts
How to select the dates dynamically like If I have scheduled a meeting of say October from date 7 to 14 how to highlight the days for it.
There is a class called DateRange in the api but how to use it where to bind it?
There are examples only showing the angular materials Date Range picker integration with the input fields with form controls labelled as 'start' and 'end' that are probably taking the inputs of the date range but in my case I want to provide the predefined input from the backend like I would be having a start date and end date which i need to set directly in the date range picker.
P.S Also tried with saturn date Range picker but its confusing having lot more modules and dependencies to be added.
A stackblitz example would be appreciated..!!
dateClass
is a function that received as argument a Date and return a string with the class (it's executed, when we change the month, for each day). the only is put the condition to return a string with the name of the class ifcellDate
meets your condition. NOTE: Don't forget put the class in thestyles.css
-not in the component.css – Eligible