0

I am learning to use PowerApps. While learning, I'm trying to create a form that includes two data cards: a start date and an end date. When a user chooses a start date, I want the end date to automatically be set to one week in the future. However, I still want the user to be able to set the end date. My question is, how do I automatically set the end date when the user chooses the start date?

Learner
  • 43
  • 2
  • 6

1 Answers1

0

Let's say you have two date-pickers, set the OnSelect property of DatePicker1 to assign the calculated new date to a variable calculatedDate.

Snippet:

UpdateContext({calculatedDate:DatePicker1.SelectedDate + 7})

enter image description here

Set the DefaultDate property of DatePicker2 to calculatedDate variable. That's it.

enter image description here