angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.31k stars 6.73k forks source link

DatePicker not showing initial value when using MomentAdapter #13264

Open robindijkhof opened 5 years ago

robindijkhof commented 5 years ago

Bug, feature request, or proposal:

Bug

What is the expected behavior?

The datepicker should show the initial value when provided.

What is the current behavior?

It does not

What are the steps to reproduce?

https://stackblitz.com/angular/kbyqgkdyyjo?file=app%2Fdatepicker-moment-example.ts

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Latest Angular. Chrome 69.0.3497.100 FireFox 62

Is there anything else we should know?

It is working here for some reason. https://material.angular.io/components/datepicker/overview#choosing-a-date-implementation-and-date-format-settings

DiyanDimitrov commented 5 years ago

It seems that for some reason the date picker is using NativeDateAdapter instead of MomentDateAdapter. The issue seems to be reproducible only in stackblitz. If I download the sample locally, it works as expected. This issue might be duplicate of #9780.

robindijkhof commented 5 years ago

Looks like it, though i'm also experiencing this in my local project.

DiyanDimitrov commented 5 years ago

@robindijkhof Do you reproduce this issue when you download the stackblitz sample locally or in a separate local project?

robindijkhof commented 5 years ago

A seperate project. But it has been a while ago and I haven't tested it again.

viniciusschuelter commented 2 years ago

Really this is a problem with stackblitz https://github.com/angular/components/issues/12458. I recomened close this issue @andrewseguin