Ngx-bootstrap: How to use DatePicker Popup

Created on 17 Jun 2016  路  2Comments  路  Source: valor-software/ngx-bootstrap

I do not want to use default datepicker which is inline.

Please help me to use show hide datepicker or datepicker popup.

Most helpful comment

What issues do you have with showing / hiding the control ?
You could just add an NgIf to the element, maybe something along the lines of:

<input type="text" [ngModel]="dt" (focus)="showDatePicker = true">
  <div *ngIf="showDatePicker" style="position: absolute; z-index:10; min-height:290px;">
    <datepicker [(ngModel)]="dt" [minDate]="minDate" [showWeeks]="true"></datepicker>
  </div>

All 2 comments

What issues do you have with showing / hiding the control ?
You could just add an NgIf to the element, maybe something along the lines of:

<input type="text" [ngModel]="dt" (focus)="showDatePicker = true">
  <div *ngIf="showDatePicker" style="position: absolute; z-index:10; min-height:290px;">
    <datepicker [(ngModel)]="dt" [minDate]="minDate" [showWeeks]="true"></datepicker>
  </div>

please follow this issue: https://github.com/valor-software/ng2-bootstrap/issues/273
it should be released this week

Was this page helpful?
0 / 5 - 0 ratings