Topic: mdb-date-picker 1 click select
Hi,
How can I set an mdb-date-picker element so that a click on date will select and close it, instead of waiting for the user to somehow figure out how to close it
Add comment
Damian Gemza staff answered 6 years ago
Dear mdb2,
There's option in Datepicker Component to achieve your desired behavior. Just add closeAfterSelect: true parameter into Datepicker options object.
Please see come below:
HTML
And in ts file, please add :
After that, your datepicker will close after selecting a date.
Best Regards,
Damian
<mdb-date-picker name="mydate" [options]="myDatePickerOptions" [placeholder]="'Selected date'" [(ngModel)]="model" required></mdb-date-picker>
public myDatePickerOptions: IMyOptions = { closeAfterSelect:true };
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Resolved
Specification of the issue
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No