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

256
Vistas
ng2-date-picker - After typing date in datepicker input we can see that date in calendar, but after selecting it from calendar it deletes from input

After typing date in datepicker input we can see that date in calendar, but after we type that date and it shows in calendar, we select it from calendar but it deletes from input. I guess it is problem with same dates, so if you type some date and then select that same date from calendar it somehow repeal. Someone knows how to solve this problem? We need this date even if it is the same one from typing.

file.html
<dp-date-picker
                    id="search_dateFrom"
                    class="dp-date-picker"
                    theme="dp-material"
                    mode="day"
                    placeholder="DD.MM.GGGG."
                    [config]="this.config"
                    [(ngModel)]="datesArray['dateFrom']"
                    (onSelect)="checkValue($event)"
                    (ngModelChange)="onChangeSearch2($event)"
                  >
                  </dp-date-picker>

file.ts

onChangeSearch2(event)
  {
    console.log('event',event);
  }

checkValue(event){
    if (event.type == 'selection')
      if(event.date._i)
      {
        this.datesArray['dateFrom']=event.date._i;
      }

  }

after typing

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

0

Might as well post a proper answer.

According to the docs it seems to be the default behavior that dates can be both selected and unselected. Fortunately, there is a property called unSelectOnClick which if set to false, prevents the user from unselecting dates.

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