cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Action on datepicker - when the calendar shows

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

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

 

 

 

View solution in original post

2 REPLIES 2
Community Support
Community Support

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

 

 

 

View solution in original post

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

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (74,397)