web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / multiple Date Picker
Power Apps
Unanswered

multiple Date Picker

(0) ShareShare
ReportReport
Posted on by 4
Hi everyone,
I have a problem on my app, 
I currently have some users who log into the app and select a date from a DatePicker and click a button that stores their reservation for the selected day in a Microsoft List table.
I would like to give users the opportunity to select multiple days at the same time without having to add them one at a time.
 
any ideas on how I can do it?
thank you all
Have a good evening
Categories:
I have the same question (0)
  • Suggested answer
    Gabriel G. Profile Picture
    831 Super User 2025 Season 2 on at
    Hi there!

    You can get a date picker, a button and a gallery. The user select a date, which push the button to store the date selected in a collection, which can be viewed through a gallery (and delete one if he wants.

    When the user is ready, you can add another button below gallery to save all dates from the gallery.

    I hope it helps!
    _______________________________________________________
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
  • Suggested answer
    venturemavenwill Profile Picture
    1,189 Super User 2025 Season 2 on at
    To add to the previous answer - you will need to use some light PowerFx codes to prepare the collection, to update the collection when you update the date picker, and to write it to SharePoint. 
     
    Consider the following formula on the onvisible property when the page is loaded
     
    ClearCollect(
        DateCollection,
        { DateValue: Date(2025, 1, 1) },
        { DateValue: Date(2025, 2, 1) },
        { DateValue: Date(2025, 3, 1) }
    )
    In the gallery, add a datepicker, and use something like this in the onchange property
     
    Patch(
        DateCollection,
        ThisItem,
        { DateValue: Self.SelectedDate }
    )
    Finally, when you click on the button, do something like this on the Onselect property of the button to save it to SharePoint
     
    ForAll(
        DateCollection,
        Patch(
            MySharePointList,
            Defaults(MySharePointList),
            { EventDate: DateValue }
        )
    )
    Adjust the setup according to your situation. 
     
  • GS-25021227-0 Profile Picture
    4 on at
    HI to all,
    unfortunately when I insert the formulas you suggested I encounter some errors, sorry but I'm really new to power apps and I'm trying to get into the perspective.
     
    following your advice I created a new screen and inserted the following code into the ONVISIBLE properties:
     
    ClearCollect(
        DateCollection,
        { DateValue: Date(2025, 1, 1) },
        { DateValue: Date(2025, 2, 1) },
        { DateValue: Date(2025, 3, 1) }
    )
     
    when I enter the code it gives me the following error on the comma after DateCollection:
    Unexpected characters. The formula contains 'Error' where 'ParenClose' is expected.
     
     
    inserted a gallery called DateCollection and inserted the following code in the ONCHANGE properties:
     
    Patch(
        DateCollection,
        ThisItem,
        { DateValue: Self.SelectedDate }
    )
     
    the same error....
     
     
    inserted a button called book and inserted the following code in the ONSELECT properties:
     
    ForAll(
        DateCollection,
        Patch(
            Car Parking Reservation,
            Defaults(Car Seat Reservation),
            { EventDate: DateValue }
        )
    )
     
     
    my sharepoint list is called PrenotazionePostoAuto
     
     
     
    Any idea??
     
    Thanks and sorry again for my inexperience
  • venturemavenwill Profile Picture
    1,189 Super User 2025 Season 2 on at
    Are you in the EU by any chance?
     
    If your system setting is an European language that is not English, then you would have to tweek the PowerFX a bit. 
     
    Where there is a comma, replace it with a semicolon, and where semicolon is used, use 2 semicolons. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard