Datepicker value not showing in AngularJs


Topic: Datepicker value not showing in AngularJs

Onemole asked 7 years ago

Hi, Im trying to set a default value through ng-model in a datepicker view, but i dont know why it does'nt show any value when i view it. Here is how the snippet for the view looks like: <mdb-date-picker [options]="datePickerOptions" name="startDate" [(ngModel)]="startDate" required></mdb-date-picker> Here is how the snippet for the logic looks like: constructor(){    this.startDate = "2018-10-3"; }

Damian Gemza staff commented 7 years ago

Dear Onemole, do you use our product in AngularJS ? In fact, Angular 1.x ? We're not supporting this old Angular. We're supporting only 5. Best Regards, Damian

Onemole commented 7 years ago

I use Angular 5

Damian Gemza staff commented 7 years ago

Dear Onemole, please use solution added by my friend Dawid. It will add default date to your datepicker after view init. https://mdbootstrap.com/support/howto-programmatically-set-the-date-in-datepicker/ Best Regards, Damian

Onemole commented 7 years ago

Thanks, its working fine now

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Closed

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No