cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Digital
Impactful Individual
Impactful Individual

Creator Kit Date Picker. How to toggle visibility?

The new creator kit data picker looks great but I'm struggling to get it to behave in a useable manner. I want to be able to click on a text field which displays the picker and when the user selects a date the picker hides. I have implemented this using the method outlined below, but when the user first clicks the text control the calendar shows briefly then hides immediately. Subsequent clicks work fine.

 

I have a text field that when selected toggles the visibility of the date picker. Selecting a date in the picker hides the date picker.

 

txtSelectedDate.OnSelect 

UpdateContext({varShowCal:!varShowCal})

 

datePicker.OnChange

UpdateContext({varShowCal:false})

 

datePicker.OnVisible

varShowCal

 

The OnChange of the calendar must be firing when clicking on the text control. Not sure if this could be considered a bug or how to get around it.

 

I previously implemented this very method in another app and it is still working as intended despite the kit being updated. I've even copied it directly from my old app to the new app and it breaks!

1 REPLY 1
WarrenBelz
Super User
Super User

Hi @Digital ,

OnSelect is a bit dangerous with double-clicks in Text fields. Have you considered OnChange ?

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,697)