I have a problem using materializeParams when I try to modify them. I've been reading in different issues and it seems that it's necessary to change the reference of the object, however it doesen't work for me.
An Async function that is called sometimes and changes the disable array
function asyncFunction(newArrayOfDisableDays){
this.params.disable =newArrayOfDisableDays;
/*
Things I tried after this
this.params = Object.assign({},this.params);
Another attemp
this.params = JSON.parse(JSON.stringfy(this.params));
Also tried to make this.params an event emitter and use in the template the pipe async, still no working
*/
}
Hi
I have a problem using materializeParams when I try to modify them. I've been reading in different issues and it seems that it's necessary to change the reference of the object, however it doesen't work for me.
That's the relevant part of my code
The template
<input formControlName="date" type="date" class="datepicker" materialize="pickadate" [materializeParams]="[params]">
The component
Declaration
params = {min: new Date(), disable: [6,7]};
An Async function that is called sometimes and changes the disable array
Those are my software versions of materialize
"angular2-materialize": "^15.0.1", "materialize-css": "^0.98.2"
I'm sure I am missing something.
Thanks in Advance