cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Patron
Post Patron

Efficient user friendly way to select multiple dates and add to collection?

I am trying to use datepicker to allow users to add dates to a collection so that I can then run a ForAll based on that collection of dates. I am trying to find the easiest way for users to add multiple dates. They may be selecting work weeks at a time. Right now they have to select one at a time. Seems like there has to be a better way to do it? Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Efficient user friendly way to select multiple dates and add to collection?

HI @BrianHFASPS ,

Do you want to select multiple dates once time within the DatePicker control?

 

If you want to select multiple dates once time within the DatePicker control, I afraid that there is no way to achieve your needs in PowerApps currently.

If you would like this feature to be added within PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

As an alternative solution, I think two DatePicker controls could achieve your needs. You could consider take a try to add two DatePicker controls within your app, then select a Date value within the first DatePicker control as Start Date, select another Date vlaue within the second DatePicker control as End Date.

After that, you could calculate the Dates between the Start Date and End Date within your app, and add them into a Collection.

I have made a test on my side, please take a try with the following workaround:1.JPG

 

2.JPG

 

3.JPG

Set the OnSelect property of the "Calculate" button to following:

ClearCollect(
            DateRanges,
            AddColumns(
                       FirstN(
                               [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],
                               DateDiff(DatePicker1.SelectedDate, DatePicker2.SelectedDate, Days) + 1
                       ),
                      "Day",
                      "Day " & (Value + 1),
                      "Date",
                       DateAdd(DatePicker1.SelectedDate, Value, Days)
            )
)

Set the Items property of the Data Table control to following (enable proper fields within your Data Table😞

DateRanges

Please check the attached GIF screenshot for more details:Test.gif

Please also check and see if the response within the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/General-Discussion/Consecutive-date-range-into-collection/td-p/4...

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Efficient user friendly way to select multiple dates and add to collection?

HI @BrianHFASPS ,

Do you want to select multiple dates once time within the DatePicker control?

 

If you want to select multiple dates once time within the DatePicker control, I afraid that there is no way to achieve your needs in PowerApps currently.

If you would like this feature to be added within PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

As an alternative solution, I think two DatePicker controls could achieve your needs. You could consider take a try to add two DatePicker controls within your app, then select a Date value within the first DatePicker control as Start Date, select another Date vlaue within the second DatePicker control as End Date.

After that, you could calculate the Dates between the Start Date and End Date within your app, and add them into a Collection.

I have made a test on my side, please take a try with the following workaround:1.JPG

 

2.JPG

 

3.JPG

Set the OnSelect property of the "Calculate" button to following:

ClearCollect(
            DateRanges,
            AddColumns(
                       FirstN(
                               [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],
                               DateDiff(DatePicker1.SelectedDate, DatePicker2.SelectedDate, Days) + 1
                       ),
                      "Day",
                      "Day " & (Value + 1),
                      "Date",
                       DateAdd(DatePicker1.SelectedDate, Value, Days)
            )
)

Set the Items property of the Data Table control to following (enable proper fields within your Data Table😞

DateRanges

Please check the attached GIF screenshot for more details:Test.gif

Please also check and see if the response within the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/General-Discussion/Consecutive-date-range-into-collection/td-p/4...

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,118)