ng-matero / extensions

Angular Material Extensions Library.
https://ng-matero.github.io/extensions/
MIT License
393 stars 48 forks source link

Can't bind to 'minDate' since it isn't a known property of 'mtx-datetimepicker'. #220

Closed TiLopes closed 11 months ago

TiLopes commented 11 months ago

Full error: Can't bind to 'minDate' since it isn't a known property of 'mtx-datetimepicker'.

  1. If 'mtx-datetimepicker' is an Angular component and it has 'minDate' input, then verify that it is included in the '@Component.imports' of this component.
  2. If 'mtx-datetimepicker' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@Component.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@Component.schemas' of this component.

how I'm using the property:

<mtx-datetimepicker
   #datetimePicker
   type="month"
   mode="portrait"
   startView="month"
   timeInput="false"
   minDate="{{ salario.data }}">
</mtx-datetimepicker>
nzbin commented 11 months ago

Can you give me an online example?

TiLopes commented 11 months ago

Would a github repo work? I tried Stackblitz but I couldn't get it work properly.

nzbin commented 11 months ago

I'm sorry, there has no minDate prop, you should use min prop of input instead.

https://github.com/ng-matero/extensions/blob/5998fd6b1f02ba0efd28c8b68ce2d0ce9c1a8758/projects/dev-app/src/app/datetimepicker/datetimepicker-demo.component.html#L2-L11