DatePicker Feature Request: "Today" button
Bug, feature request, or proposal:
Feature request
What is the expected behavior?
Add a configurable "Today" button to the DatePicker that automatically sets today's date as the value for the form field
What is the current behavior?
Users commonly scroll to different years/months/etc using the DatePicker and get stuck very far away from where they'd like to be. Like any complex, menu-centric navigation user interface, there should be an easy way to jump directly back to where you started.
What are the steps to reproduce?
n/a -- feature request
What is the use-case or motivation for changing an existing behavior?
This is a UX improvement. Allowing users to easily jump to "Today" via a button press allows them to "start over" super easily from wherever they may have ended up navigating through the DatePicker rabbit hole. Additionally, it makes it easy for users to jump to a date that constantly changes, but is commonly selected on that given day, making their experience just that much better.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
n/a -- feature request
Is there anything else we should know?
Should include i18n + a11y support, but that's always easier said than done.
Seems to be a decent feature addition, but a developer can always add this feature, depending on the requirements. Because, integrating more and more options to a component will result in hard-coupling, thereby making the overall component unnecessarily bulky.
Ideally, a component should serve the purpose of general reusable piece of code, with bare-minimum features. Now, if any developer need some additional feature which doesn't require fundamental changes to the component's API, then it must be added on top of it.
+1
@zelias500 fancy meeting you here
Is there a piece of code to start with on how to add a today button to the header of the datepicker?
+1
+1
+1
+1
+1
This functionality is not in the Material Design spec (https://material.io/components/date-pickers) so it is out of scope for Angular Material but you can add a custom header. https://stackblitz.com/angular/jxrdygrqknj?file=src%2Fapp%2Fdatepicker-custom-header-example.ts
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.