matheo / angular

Open Source Angular Libraries: MatDataSource, MatDatepicker
http://matheo.co/demos/
MIT License
60 stars 15 forks source link

Datetime picker: Default stackblitz #18

Closed wiegell closed 3 years ago

wiegell commented 3 years ago

Suggestion for stackblitz for new issues: https://stackblitz.com/edit/components-issue-gkdfcp?file=package.json

Forked from https://stackblitz.com/fork/components-issue (official material / angular issues)

For some reason the mat-calendar component doesn't get the mat-calendar class applied - any ideas why? Messes up the width!

wiegell commented 3 years ago

Updated with MAT_DATE_LOCALE, so that the time shows (should maybe be added to readme?): https://stackblitz.com/edit/components-issue-qxherj?file=src/app/example-component.html

wiegell commented 3 years ago

switching to ivy fixed the missing class problem

wiegell commented 3 years ago

Ty, but just think i found an error: MatNativeDateModule is imported in main.ts from @angular/material/core, which shouldn't be needed, right? Seems to work though.

matheo commented 3 years ago

Hmmm it should be imported from @matheo/datepicker too :thinking: I'm not sure if the time settings will improve the parsing, I guess not because it's always using Date.parse

wiegell commented 3 years ago

It's imported in the material module from @matheo/datepicker, but shouldn't also be imported from @angular/material? Doesn't change the parsing problem when it's only imported once