Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

255
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!