Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

515
Vistas
Angular - How to disable particular date in Datepicker?

I want to disable Monday from "mat-datepicker". So here is my code in the class component.

  dateFilter = (_date: any) =>{
    let day = _date.getDay();
    console.log(day);
    
    return day != 1;
  }

And in my template file :

 <input [matDatepicker]="picker" [matDatepickerFilter]="dateFilter" />
 <mat-datepicker (closed)="ClosePicker($event)" #picker></mat-datepicker>

But now after implementing this, I can't see any date on my calendar. And in the months section, I just see "February" available there. No other months are showing. Does anyone know how to fix this? I am willing to share more code if needed.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Please Use Min max function to select and disable certain date periord

By using Angular Material

<mat-form-field style="width:130px;" appearance="fill">
                        <input style="position: relative;top: -7px;" [min]="nestedMinDate" matInput [matDatepicker]="picker3"
                          [(ngModel)]="nestedReorder.PromiseDate"
                          (change)="dateFormating(nestedReorder.PromiseDate,i,j)">
                        <mat-datepicker-toggle matSuffix [for]="picker3"></mat-datepicker-toggle>
                        <mat-datepicker #picker3></mat-datepicker>
                      </mat-form-field>

Type Script Code

this.minDate= formatDate(new Date(), 'yyyy-MM-dd', 'en');
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda