ng2-datepicker icon indicating copy to clipboard operation
ng2-datepicker copied to clipboard

remove readonly in input box

Open rajhim opened this issue 7 years ago • 2 comments

if i want to edit manually date.. there is no option to change ... removing readonly is better..!

rajhim avatar Sep 25 '17 05:09 rajhim

@rajhim, @coffeymatt, you can use headless property to disable internal input and use your external <input>:

<input type="text" name="date" [(ngModel)]="date" />
<ng2-datepicker [headless]="true" [(ngModel)]="date"></ng2-datepicker>

x1unix avatar Nov 29 '17 22:11 x1unix

how does it work with ng-datepicker? It doesn't work for me. I use 'ng-datepicker' and I see just enabled for manual entry input but not datepicker. <input type="text" name="date" [(ngModel)]="date" /> <ng-datepicker [headless]="true" [(ngModel)]="date">

Here is the answer

<input type="text" name="date" [(ngModel)]="date" (click)="picker1.toggle()"/> <ng-datepicker [headless]="true" #picker1 [(ngModel)]="date">

irynaslisava avatar Feb 06 '18 16:02 irynaslisava