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 / Action on datepicker -...
Power Apps
Answered

Action on datepicker - when the calendar shows

(0) ShareShare
ReportReport
Posted on by 103

I have a datepicker in a powerapp. I have a rectangle cover that sets it's Visibility to true (context variable) when the datepicker control is selected to cover up the buttons still exposed behind the calendar. What I don't see is any action for powerapps to be aware of when the Calendar is showing/not showing. For normal action, it doesn't matter as selecting a (different) date triggers the OnChange property and sets the Visibility (context variable) to false. However, if the user selects the same date as was previously set and then OK or hits Cancel, the OnChange event does not fire and the visibility doesn't get set to false. As a workaround, I have set the OnSelect property for the rectangle to set the visibility to false (context variable) so the user is not stuck. To do this right though, I wanted to know if there is any way to trigger anything based upon either the calendar being visible/not visible or trigger when a user is selecting the OK or Cancel button in the calendar.
Screen Shot 2020-04-25 at 8.46.14 PM.png

 Thanks,

 

Brian

 

Categories:
I have the same question (0)
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @BrianCCampbell ,

     

    There is no such out of box property to show the visible status of Calendar Tab, and the Cancel button doesn't trigger anything, so it's a little tricky.

    As an alternative workaround, I accomplish your needs by a TextInput box, Calendar icon, and a calendar component.

    Please find the calendar component in the attachment.

    1. import the calendar component into the app

    2. add a TextInput box, Calendar icon, and a calendar component

    3. set App.OnStart: Set(MyVar,false)

    3. set Text box.Default: Calendar_1.StartDate

    4. set icon. OnSelect: Set(MyVar,true);Set(selectedDate,Calendar_1.StartDate)

    5. set OK Button.OnSelect: Set(MyVar,false)

    6. set Cancel Button.OnSelect: Reset(Calendar_1);Set(MyVar,false)

    7. set rectangle.Visible: MyVar

    Test Result: GIF_67.gif

    Hope this helps.

    Sik

     

     

     

  • BrianCCampbell Profile Picture
    103 on at

    Thanks so much for the alternative workaround and the definitive answer that at this time the calendar visibility and cancel are not actionable in PowerApps.

     

    Thanks,

     

    Brian

  • microconsulting Profile Picture
    18 on at

    Hi @BrianCCampbell , @v-siky-msft 

    ezgif.com-gif-maker (1).gif

     

    Check out custom date picker control for Power Apps.

    Please check this link for installation instructions.

    http://themicroconsulting.com/powerapps-custom-calendar-component-with-time-picker/

     

    Your feedback will be more than appreciated.

     

    Thanks 🙂

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
WarrenBelz Profile Picture

WarrenBelz 421 Most Valuable Professional

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard