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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Place the datepicker a...
Power Apps
Answered

Place the datepicker adjacent to each other, added through SharePoint

(0) ShareShare
ReportReport
Posted on by 195

I had a field in SharePoint list called "Registration Date". I designed a powerapps form and was able to submit successfully.

 

However, we had a change in design and the "Registration Date" field to be split into 1. Registration Date (From) , 2. Registration Date(To).

 

To implement this, I renamed the existing Registration Date to Registration Date (From) and created an extra field in SharePoint for Registration Date(To)

 

However, I needed FromDate and ToDate field inline, rather than on separate datacard. Since its 2 different datacards, am unable to club it together in a single field adjacent to each other.

 

Date.PNG

 

I added a datepicker inside one of the datacard and the datepicker now appear adjacent to each other. However, the 2nd datefield added through powerapps, should get saved into the SharePoint field.

 

Anyidea on how to save the date value from the datepicker added through powerapps to Sharepoint.

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,246 Most Valuable Professional on at

    Since the Datacard itself is bound to a specific field there is no way to have two datepickers bound to different fields inside a single datacard.  But here's a workaround

     

    1) Set Visible property of the two regular start and end date datacards to false

    2) Add two datepickers to the form and set their default to Today() for a new form and the date in the field for an edit form

    3) Set the default property of the two hidden datacard fields to the appropriate datepicker's selected date property.

     

    Now when you edit the visible start and end datepickers on the form it will set the two hidden datacards.  When you submit the form those values will be saved.

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Kumar9024021 ,

    Do you want to put the two date fields data card into single one data card rather than separated data fields?

     

    Based on the needs that you mentioned, I afraid that there is no direct way to achieve your needs. As an alternative solution, I think the custom data cards could achieve your needs.

     

    On your side, you could consider disable the "Registration Date (From)" field and "Registration Date (To)" field within your Edit form, instead, add a custom data card in your Edit form, then within the custom data card, add two DatePicker controls:

    2.JPG

     

    3.JPG

     

    4.JPG

    Please configure your Edit form as above, then set the OnSelect property of the "Submit" button to following:

    Set(FromDate, RegistrationDateFromPicker.SelectedDate);
    Set(ToDate, RegistrationDateToPicker.SelectedDate);
    SubmitForm(EditForm1)

    set the OnSuccess property of the Edit form to following:

    Patch(
     'Your SP List',
     EditForm1.LastSubmit,
     {
     'Registration Date (From)': FromDate,
     'Registration Date (To)': ToDate
     }
    );
    Set(FromDate, Blank());
    Set(ToDate, Blank());
    Back()

     

    Please consider take a try with above solution, check if the issue is solved.

     

    Best regards,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard