Topic: Datepicker disable & data with reactive forms (Angular 5)
mooseCH pro asked 6 years ago
Damian Gemza staff answered 6 years ago
<div class="row"> <div class="col-md-6 mx-auto my-5"> <mdb-date-pickername="mydate" [options]="myDatePickerOptions" [placeholder]="'Selected date'" [(ngModel)]="model" #datePickerdisabledrequired></mdb-date-picker> </div> </div> <button class="btn btn-primary waves-light" mdbWavesEffect (click)="open()">Button</button>
@ViewChild('datePicker') datePicker: MDBDatePickerComponent; publicmyDatePickerOptions:IMyOptions= { }; open() { this.datePicker.openBtnClicked(); }
Damian Gemza staff answered 6 years ago
<form [formGroup]="validatingForm"> <mdb-date-picker #datePicker name="required" [options]="myDatePickerOptions" [placeholder]="'Selected date'" [(ngModel)]="model" formControlName="required"></mdb-date-picker> </form>
aionys pro commented 6 years ago
Have the same issue. The input is available by focusing on it with tab. Is it possible to disable input in the datepicker or add some selector to open modal not by clicking on the field? Version: 5.2.3FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No