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

Hey guys, I'm curios what the current state of this feature is?

MALIK-0 avatar Sep 10 '18 06:09 MALIK-0

@TobiasMalikowski I gave up on this and wrote one from scratch following this youtube tutorial:

https://www.youtube.com/watch?v=ovamx9ePIuE

It was actually super easy and is way more powerful than a material component (in terms of customising its functionality)

botoxparty avatar Sep 10 '18 06:09 botoxparty

@botoxparty Thanks for your link. I've looked into this and saved it as a fallback solution. However I still hope that the guys working on the Material date picker will finish it.

This is a essential feature when working with dates, so I hope this gets finished in the near future. Anyway would be nice to hear from @SaturnTeam and @mmalerba :)

MALIK-0 avatar Sep 10 '18 06:09 MALIK-0

@TobiasMalikowski I already have a package based on material source code https://www.npmjs.com/package/saturn-datepicker

SaturnTeam avatar Sep 10 '18 06:09 SaturnTeam

There's this https://github.com/angular/material2/pull/13041 whatever it means (the person seems to be working at Google)..

fxck avatar Sep 10 '18 08:09 fxck

It seems like refactoring of input value as I discussed and tried to implement with @mmalerba some months ago

SaturnTeam avatar Sep 10 '18 08:09 SaturnTeam

I'm working with a couple folks at Google to implement a similar solution to what I discussed with @SaturnTeam I'll related add issues and PRs here: https://github.com/angular/material2/projects/23 (Don't trust the completion percent though, I haven't added issues for all of the tasks that need to be done).

mmalerba avatar Sep 10 '18 18:09 mmalerba

@mmalerba Is there any room to jump in and help with this effort? I'm looking to use this once it is released, and I would love to help push that effort forward.

Trendy avatar Sep 21 '18 18:09 Trendy

@Trendy There are currently two people working on it and I'm reluctant to add more so that coordinating between us doesn't become more difficult. I'll let you know if a good place to contribute to this comes up

mmalerba avatar Sep 21 '18 19:09 mmalerba

@mmalerba https://github.com/angular/material2/pull/13041 it looks like this project is completed? I would also like to use this once its released

kendallcarey avatar Oct 03 '18 18:10 kendallcarey

It's not completed yet, I just haven't added a full list of tasks to be completed

mmalerba avatar Oct 03 '18 19:10 mmalerba

Got a date range to work with max and min year variables, could probably work with month and day ranges.

minDate = new Date(this.minYear(), 0, 1); maxDate = new Date(this.maxYear(), 0, 1);

minYear() { return new Date().getFullYear() - 100; } maxYear() { return new Date().getFullYear() - 18; }

jStoutAssure avatar Nov 06 '18 17:11 jStoutAssure

@mmalerba please do you have a date on which the project will be completed and released?

sancaruso avatar Nov 23 '18 08:11 sancaruso

Any update please?

keserwan avatar Nov 23 '18 12:11 keserwan

翘首以盼 Looking forward

liuganchen avatar Dec 06 '18 07:12 liuganchen

any news ?

Githamza avatar Dec 10 '18 16:12 Githamza

Just use https://www.npmjs.com/package/saturn-datepicker for a while

SaturnTeam avatar Dec 10 '18 16:12 SaturnTeam

Last time I used Saturn datepicker it was a disaster.

Honestly just code your own datepicker I dont know why people are waiting for this to happen.

On Tue, 11 Dec. 2018, 3:51 am SaturnTeam <[email protected] wrote:

Just use https://www.npmjs.com/package/saturn-datepicker for a while

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/angular/material2/issues/4763#issuecomment-445886800, or mute the thread https://github.com/notifications/unsubscribe-auth/AXcP5GRzNYbSUzfwbvtouh0uWSUxzIwOks5u3pElgaJpZM4Nkx8N .

botoxparty avatar Dec 11 '18 21:12 botoxparty

@botoxparty why it was a desaster ? can you explain ?

Githamza avatar Dec 12 '18 08:12 Githamza

We are using Saturn datepicker in a project and it is very ok. Can definetely recommend it.

margielm avatar Dec 12 '18 18:12 margielm