Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

264
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda