Topic: Angular Datepicker No Longer Accepts String Date Values

cloudscale premium asked 4 years ago


Expected behavior

Datepicker no longer seems to accept string date values. It will not accept "10/10/2019" as a value anymore, where in previous versions it did.

Actual behavior

Date either disappears or is set to 12/31/1969

Resources (screenshots, code snippets etc.)

   myDate : string = '10/01/2019';
    getDatePickerOptions: IMyOptions = {
        dateFormat: "mm/dd/yyyy",
        firstDayOfWeek: "su",
        closeAfterSelect: true,
        minYear: 2019,
        maxYear: 2019
      };
<mdb-date-picker [inline]="true" name="startDate" [options]="getDatePickerOptions" [placeholder]="'Selected date'"
                 [ngModel]="value.startDate" (ngModelChange)="onStartDateChange($event)"
                  required>
</mdb-date-picker>

Arkadiusz Idzikowski staff commented 4 years ago

We will take a closer look at that. Could you show us what is the value of the value.startDate property?


cloudscale premium commented 4 years ago

value.startDate = '10/01/2019';


Arkadiusz Idzikowski staff commented 4 years ago

That's really strange because I tried to reproduce this problem on my end and everything works correctly. Could you provide full html/ts code or example demo app on which we will be able to debug that? You can send it to a.idzikowski@mdbootstrap.com.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Opened

Specification of the issue

  • ForumUser: Premium
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: 8.5.0
  • Device: Computer
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No