cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BrianHFASPS
Level 8

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
Community Support Team
Community Support Team

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
Community Support Team
Community Support Team

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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

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