angularangular-materialngx-daterangepicker-material

angular material custom inputs for mat-date-range-picker


I must have two custom separated inputs for mat-date-range-picker. It should look in this way: (I know how to write this css)

enter image description here

I know how to write this css. But the problem is that I can't get value of this datepicker. It seems like I have to use mat-range-input with material inputs only. And I also have to use matStartDate matEndDate.

It means that there should be this snippet of code:

<mat-date-range-input>
  <input matStartDate placeholder="Start date">
  <input matEndDate placeholder="End date">
</mat-date-range-input>

but i gotta have 2 custom separated inputs :(


Solution

  • I hided the mat-date-range with opacity: 0 and got the values from it