angulardart / angular_components

The official Material Design components for AngularDart. Used at Google in production apps.
https://pub.dev/packages/angular_components
372 stars 122 forks source link

MaterialDatepickerComponent year selection #350

Open alescdb opened 6 years ago

alescdb commented 6 years ago

Hi everyone,

Unless I'm mistaken, it is not possible to change the year in MaterialDatepickerComponent. So, if you want to select a date far in the past (or future) the only choice is to type it (or mouse scrolling for hours :-)).

It looks like it is possible in MaterialDateRangePickerComponent (month by month)

e.g : https://material.angular.io/components/datepicker

image

cpelling commented 6 years ago

Yes, that's correct. This is possible in MaterialDateRangePickerComponent using the "[Month] [Year]" dropdown, which toggles the date grid to show a month grid, but indeed this is not present in MaterialDatepickerComponent.

We do have a spec for adding an option to include the "[Month] [Year]" dropdown in MaterialDatepickerComponent. It would look pretty similar to the treatment in MaterialDateRangePickerComponent. But nobody's asked for it yet, so it hasn't been implemented. Contributions welcome, as always. :)