Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ng-pick-datetime

IN .HTML
=======
<input matInput [(ngModel)]="toDate" [owlDateTime]="dateTo"
     [value]="toDate | date: 'MM/dd/yyyy HH:mm'" owl-date-time="dateTo" readonly>
<owl-date-time #dateTo></owl-date-time>
<mat-icon matTooltip="Calendar" matSuffix [owlDateTimeTrigger]="dateTo"
     (click)="setDateTime(dateTo)">date_range</mat-icon>

IN .TS
======
setDateTime(dateTime) {
	dateTime.selected = dateTime.startAt = toDate;
}
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
8+9 =