cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Action on datepicker - when the calendar shows

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
Highlighted
Community Support
Community Support

Re: Action on datepicker - when the calendar shows

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

Highlighted
Frequent Visitor

Re: Action on datepicker - when the calendar shows

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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,246)