-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(DatePicker): select range of dates #4763
Comments
Hi. |
+1 Date range picker is also supported by |
Than, I understand that currently is not supported, no? |
http://ej2.syncfusion.com/demos/#/material/daterangepicker/minmax.html this looks decent |
I think this is quite important for many scenarios (we will use Material for enterprise applications and we sure need it). @alaawerfelli said that it should return all the dates between startDate and endDate, but I think that the component should just return both dates, as the dates could be then calculated if needed. The design would be easier as you could use startDate / endDate as input / output parameters. |
You can use [min] [max] attributes with your matDatePicker. |
@FabienInan [min] [max] attributes are about date validation, not related to date range selection. |
Is there a timeframe for the release of this feature? (or any place where we can see what are the things to come in the next couple of months?) |
readme |
I'm trying to do date range picker, and I also want to contribute it. How it is better - another component(s) or write code to existing? |
@SaturnTeam : It looks good!! I looked at the Material Design specification, but they don't say anything about selection of ranges. Your design looks very material-like! :-) |
@SaturnTeam That looks awesome, care to share the code? Thanks! |
@gerardosabetta Code not ready yet |
Material team, How do you think better - propagate values via existing |
@SaturnTeam Can you show me project demo online? Please, I need your help? |
@enqminh What do you want from it? Code done only 30% |
@SaturnTeam it's not easy to help without seeing how you plan to build the component. Will there be 2 inputs for the begin and the end of the range ? Will you have 2 outputs for each of them ? |
I just wanna datepicker form... to. |
Many thanks to all involved on this feature. Really excited to use it! |
I wonder if it would be possible to use the date-range picker to set open ranges. Like 2020.03.05. - null; null - 2020.03.05. Cause that would be nice and handy. |
I am super excited for this feature! Thank you for working on it! |
We're also eagerly waiting for this feature! |
@clement911 not yet, you can try the branch out though (see #4763 (comment)). |
@Splaktar how do we 'try out' a branch? |
@clement911 https://github.com/angular/components/blob/master/DEV_ENVIRONMENT.md#developer-guide-getting-your-environment-set-up. Then in the dev-app, you can check out the datepicker demo. |
Thanks @Splaktar but honestly I just wish there would be a simpler way, like a demo that we can play with to provide some feedback on the component UX. Will we be able to play with the date range on https://next.material.angular.io/components/datepicker ? |
@clement911 something like that will be made available in the future. |
excited! |
I am very excited for this, are there any updates ? |
You can see the demo of the in-progress work here: https://jelbourn-dev.firebaseapp.com/datepicker FYI after starting we, we got some feedback that led to expanding the scope of the initial work to make sure we'll be able to eventually support touch selection, comparison ranges, and customizable range selection. |
great.... would be also good example to see option with 2 months open the the same time when selecting a range (check most of the airlines... ryanair.com or avianca.com or united airlines or turkish airlines) this would be the most ux friendly... also, one very UX feature would be in the input mask, when clicking on a date, to have a whole date selected .... so if I am editing 1st date in the range... and click on the second (and it was already in) to select the whole date (regardles of which part of the date I click) and obviously let me edit from the left onward... and, maybe give a setting option, to have date part selected on the first click meaning, if I want to change a year of the second date, now I would have to click on that year, and then double click again to select all numbers and then start typing to override it... instead of clicking a year to be selected and start typing, or click to select all and click again to edit normally desired digit... I appreciate might not be desired functionality for all, but would be a nice feature to have and be able to configure it easily |
It looks pretty great! But I don't understand why March 9th o March 13th shows in a different color?
We would also very much like this option. Our current calendar actually shows 2 months already because it's very common to select a date range that span across 2 consecutive months. |
I'm assuming the input mask will be customizable / localizable ? Also the first day of the week could be different depending on locale, is that supported? (sorry |
Sometimes the range needs to be set to only one day (from/to same day). This is not possible in the provided demo. |
First, let me just say that with a UI as complex as a date range picker, there are a ton of features and possible UIs, but unfortunately we can't do them all. Specifically to answer some of the questions above:
@perchristian That's a good point, let me run that one by our UX folks |
Got it, thanks for these explanations.
I really hope that you fixed that one otherwise we just wouldn't be able to use this component. |
The arrow icons for previous/next months are lacking hover state. |
Sometimes we need to provide the user with a month picker. Are you planning to support configuring the picker to have month as the lowest level? By the way: I am so glad you are developing this date range picker now :) |
@mmalerba: shame there are no plans for side by side range... this dramatically improves UX... hopefully you will reconsider soon |
@perchristian this is really a UX discussion, but does a datepicker really make sense for selecting a month? selecting a day is pretty "complex" for the user, because different months have different number of days, maybe you are interested in seeing day of a week, plus we have leap years. We don't have any of that complexity when you just want to select a month. |
Filed #18958 for the missing hover state. The concept of date granularity/precision is something we've thought about a bit, but currently no concrete plans. Unless side-by-side view gets explicitly added to the Material Design spec, I think what's more likely is that we'll focus on trying to make it easier for users to implement that and other custom UIs using the same building blocks we use for the default datepicker experience, but I don't really see us adding an API specifically for that. |
@mmalerba unless i am missing something Material Design spec does have side-by-side pickers: |
I would be glad to help with precision (month and year), please see #4853 (comment). |
The feature is now in master and will be released in 10. Please post bugs as new issue reports. Closing and locking. |
Hello,
it's possible to set date range in date picker (have the ability to choose startDate and endDate and get all dates between startDate and endDate).
The text was updated successfully, but these errors were encountered: