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 / Showing Date Picker wh...
Power Apps
Answered

Showing Date Picker when any value is selected in Radio button

(0) ShareShare
ReportReport
Posted on by 26

Hi, i have a couple of questions regarding an app that i am building for a class.

 

First off, i have a Radio button with the question "Are you visiting for more than 1 day?" with "Yes" or "No" as the possible values.

If "No" is selected, DatePicker1 becomes visible. It is currently set up like this:

If(Radio1.Selected.Value = "No"; true; false)

 

If "Yes" is selected, i would still like for DatePicker1 to become visible (so it becomes visible if either option is chosen), as well as another DatePicker(2) - i understand how to make them visible if either Yes or No is chosen, but how can i make DatePicker1 show up either way?

 

If there is a better way to make a "From date / To date" setup, any help is appreciated.

 

Question 2:

I am using a Patch function to save the input from a number of questions, but as i have two DatePickers in the app, both dates are being saved, even though only one of them is visible.

Is it possible to make the field in DatePicker2 blank whenever it is not visible?

 

I hope the questions make sense, and thanks in advance

 

Categories:
  • Verified answer
    mmollet Profile Picture
    3,187 on at

    Question 1: If you always want your Datepicker1 to be visible you could always just make it true and it will always be after that. If you want it visible once one of the radios is selected then you can use the following:

    If(Radio1.Selected.Value = "No" Or Radio1.Selected.Value = "Yes", true, false)

    This will make it true if No or Yes is selected and false if it is blank i.e. neither is selected. The default is set to "" i believe by default so if that doesn't work then you can try chaning that to Blank() as well.

     

    Question 2: For your column I will call "EndDate" you can use something like this: 

    If(Datepicker2.visible, Datepicker2.selecteddate, Blank())

    This will patch the date in datepicker2 if the visible property is true and will patch blank if it is not.

  • VBL Profile Picture
    26 on at

    Perfect, that was nice and simple - thanks for the quick reply 🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard