components icon indicating copy to clipboard operation
components copied to clipboard

feat(DatePicker): select range of dates

Open alaawerfelli opened this issue 9 years ago • 148 comments

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).

alaawerfelli avatar May 24 '17 08:05 alaawerfelli

Hi. As it is write Here This is a feature that will come "Support for selecting and displaying date ranges"

ss-bb avatar May 29 '17 14:05 ss-bb

+1 Date range picker is also supported by ng-bootstrap. Example of which is available here: https://ng-bootstrap.github.io/#/components/datepicker/examples

shyamal890 avatar Jul 15 '17 17:07 shyamal890

Than, I understand that currently is not supported, no?

raugaral avatar Jul 18 '17 13:07 raugaral

http://ej2.syncfusion.com/demos/#/material/daterangepicker/minmax.html this looks decent

fxck avatar Oct 17 '17 07:10 fxck

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.

RaulRG avatar Nov 30 '17 16:11 RaulRG

You can use [min] [max] attributes with your matDatePicker.

FabienInan avatar Dec 15 '17 14:12 FabienInan

@FabienInan [min] [max] attributes are about date validation, not related to date range selection.

hanyu-natsu avatar Dec 18 '17 15:12 hanyu-natsu

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?)

pyritewolf avatar Jan 04 '18 17:01 pyritewolf

(or any place where we can see what are the things to come in the next couple of months?)

readme

fxck avatar Jan 04 '18 17:01 fxck

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 avatar Jan 05 '18 05:01 SaturnTeam

image image

What do you think, this styles is ok?

SaturnTeam avatar Jan 08 '18 10:01 SaturnTeam

@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! :-)

RaulRG avatar Jan 08 '18 11:01 RaulRG

@SaturnTeam That looks awesome, care to share the code? Thanks!

ghost avatar Jan 10 '18 17:01 ghost

@GerardoSabetta Code not ready yet

SaturnTeam avatar Jan 11 '18 00:01 SaturnTeam

UI for selected range between one month second primary-colored circle - it is :hover image image image

SaturnTeam avatar Jan 11 '18 04:01 SaturnTeam

Material team, How do you think better - propagate values via existing @Output() selectedChange: D or create @Output() dateRangeChange: MatDatePickerRangeValue<D> ?

SaturnTeam avatar Jan 11 '18 08:01 SaturnTeam

@SaturnTeam Can you show me project demo online? Please, I need your help?

varnguyen avatar Jan 11 '18 08:01 varnguyen

@enqminh What do you want from it? Code done only 30%

SaturnTeam avatar Jan 11 '18 10:01 SaturnTeam

@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 ?

hanyu-natsu avatar Jan 11 '18 10:01 hanyu-natsu

I just wanna datepicker form... to.

varnguyen avatar Jan 11 '18 10:01 varnguyen