angular / components

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

feat(DatePicker): Month range selection in mat-datepicker / mat-calendar #27922

Open meetbhalodi11 opened 8 months ago

meetbhalodi11 commented 8 months ago

Feature Description

Proposed Implementation: I suggest adding an option to the mat-date-picker/mat-calendar component that allows users to select a range of dates by clicking on a start date and an end date within the same calendar view. This would provide a more intuitive and efficient way to handle month-based selections. the similar implementation is observed in mat-date-range-picker

Use Case

The month range selection feature would be particularly useful in scenarios where users need to filter or select data over a specific period, such as monthly reports, statistics, or date-based filtering. Eg. salary reports, time and attendance reports etc

andrewseguin commented 8 months ago

Can you clarify more about what you mean about it being more efficient to handle month-based selections if there was an option to select ranges in mat-datepicker?

meetbhalodi11 commented 8 months ago

So in some use cases features where month selection is more efficient

  1. taking out time and attendance report at month end (or for specific months)
  2. downloading payroll reports (for specific months)

In such cases mentioned above there is no need to select specific dates, we just need to select month range Eg. if I want to download a report for (Jan 2023 - Mar 2023) then It would be preferable to avoid a date selection view after selecting the months.

so basically the selection would look like the below image, made by Sergey Rudenko by using html tables with some work around

Screenshot 2023-10-12 at 10 21 21 PM
stephan-strate commented 3 months ago

Any news on this topic? I would say its not only a convenience feature, sometimes its necessary to have such an input.

meetbhalodi11 commented 2 months ago

Hello team, any updates on this feature requirement?

forgantini commented 3 weeks ago

any news?