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

datepicker not updating the sceen after Patch command

I'm new to Powerapps so still doing stoopid things and finding much weirdness.

 

I have a datepicker as part of a gallery.  The gallery is connected to a local collection. A new row in the collection is "Collect"ed by a button.

 

Behind the datepicker OnChange event is...

 

Patch(timesheet,ThisItem,{TSdate: DatePicker2.SelectedDate})

 

... where timesheet is the collection and TSdate the field i'm updating.

 

This works, but does NOT update the displayed date.  It continues to display the default - "today()". If I then select the SAME date it displays correctly.

 

Without the OnChange event the displayed date updates to date selected in the picker calendar correctly.

 

It is kinda like triggering OnChange causes Powerapps to "forget" to update the display.  (I guess that when I select the SAME date again there is no OnChange triggered)

 

The only other code is behind the OnSelect event - Select(Parent)

 

I'm sure i'm being daft here, but I just cant seem to figure it out!

4 REPLIES 4
Highlighted
Super User
Super User

Re: datepicker not updating the sceen after Patch command

@DM2 

Can you please share the following additional details:

  • Code found in Items property of the gallery
  • Code found in the Text property of the label displaying date

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Frequent Visitor

Re: datepicker not updating the sceen after Patch command

Sure,

items = timesheet  //Ie just the raw local collection

There is no separate label control, the datepicker is part of the gallery and the date is displayed by that. As far as I can see there is no text attribute of a date picker, only SelectedDate.  It's not a selectable attribute or event in the editor so there is nothing behind it that I can see.

 

Thanks for replying!

Highlighted
Frequent Visitor

Re: datepicker not updating the sceen after Patch command

@mdevaney 

 

reply above.

(Sorry, forgot to tag)

Highlighted
Frequent Visitor

Re: datepicker not updating the sceen after Patch command

Just in case anyone else has the same issue and stumbles across the thread..

 

I never found a solution to this so I ended up moving all the editing capability out of the gallery and into separate controls.  Not quite as neat, but hey, Powerapps is at it's best when you need something quick and can accept that you have to do things its way or no way. 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

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

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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