Sign in

Sign up

Datepicker disable & data with reactive forms (Angular 5)

MDB SupportCategory: MDB AngularDatepicker disable & data with reactive forms (Angular 5)
mooseCH Pro User asked 3 months ago in MDB pro, version:5.1.2

Hi,Is there any possibility to disable the Datepicker component? I figured out that if I enter the date manually (by focusing the datepicker with tab) the date is not stored in my Angular Reactive Form Component.If I enter it by using the datepicker with the date-selection, it works properly.Any idea how I can store the date by typing it manually? Best,moose

1 Answers
Damian Gemza answered 3 months ago

Hello mooseCH,

I’ve checked your’s problem, but for me, everything is working fine.

I have imported ReactiveFormsModule in my app.module, and created a datepicker markup in this way:

<form [formGroup]="validatingForm">

<mdb-date-picker #datePicker name="required" [options]="myDatePickerOptions" [placeholder]="'Selected date'" [(ngModel)]="model"


When i click on input, and paste there some data (for example 01-01-2016), my datePicker modal is changing displaying date to this from input.
Could you provide me reproduce steps so i can check it again in your’s way? Or maybe you can send me an email with your’s project without node_modules directory?
Best Regards,