Good evening.
I need to set / assign a value to a date of a specific component that is a date before loading my page. In this example I try to assign the first and last day of the month.
HTML:
<pf-input-date [(date)]="fechaHasta" mode="day" name="fechaHasta"></pf-input-date>
TypeScript:
export class LiquidoProductoComponent implements OnInit {
fechaDesde: Date;
fechaHasta: Date;
date: Date;
ngOnInit() {
this.date = new Date();
// Verificar
let desde = new Date(this.date.getFullYear(), this.date.getMonth(), 1);
var hasta = new Date(this.date.getFullYear(), this.date.getMonth() + 1, 0);
// Esta asignacion la realiza pero no asi el binding
this.fechaDesde = desde;
this.fechaHasta = hasta;
};
}
Thank you very much already.