angular / components

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

Support for native html datepicker control #17706

Open naveedahmed1 opened 4 years ago

naveedahmed1 commented 4 years ago

Feature Description

mat-select component has an option to use native html select control instead of Angular Material Select component. This is really helpful for devices with limited computational power. In our case we use mat-select on desktop and html native select on mobile devices.

Native html controls not only offers performance benefits but also offer better user experience on mobile devices for example list loads quickly, scrolling is fast and user can use hardware back button to close the list.

Here is a suggestion to please also add support to use HTML native datepicker with mat-datepicker Component. So that we can use native html datepicker control on mobile/slow devices to offer better user experience.

crisbeto commented 4 years ago

This should work already if you use a mat-form-field with an input[type="date"].

naveedahmed1 commented 4 years ago

I tried this, but the form field isn't prepopulated when the control already contain a value, for example in case of Edit form. It shows dd/mm/yyyy despite of the fact that the control has a value.

crisbeto commented 4 years ago

That sounds like it might be an issue with @angular/forms.

naveedahmed1 commented 4 years ago

Should this be reported on Angular repository? if so, can you please transfer this issue to Angular repository?

hisham commented 3 years ago

+1 any update on this? Is https://github.com/angular/components/issues/17706#issuecomment-557882732 still an issue?

naveedahmed1 commented 3 years ago

I can confirm it doesn't work even with latest version of Angular and Material.

@crisbeto @jelbourn we can greatly improve user experience for datepicker controls on mobile devices if this issue can be fixed any time soon.

angular-robot[bot] commented 2 years ago

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

angular-robot[bot] commented 2 years ago

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.