Forum Discussion
PowerApps Form Default Date as Selected Date from Calendar View
Although I have not the answer to your question (as I'm running into the same problem) I'd like to know: How did you setup the "All Day" toggle, more exactly which values did you fill the time combo fields when triggered?
GaboX I've come at this a few different ways so far. My current approach involves hiding the hour and minute dropdowns when "all day" is toggled 'on'. Then on the data card for the start and end date fields I use an if within the "update" field. I like this approach since I don't have to track what the user had selected as a start/end time in the case of the user deciding they didn't want all day after all (since changing the values in the actual dropdowns would mean when the fields are visible again they would be set to 00:00 and 23:59 respectively). This way if the user toggles off All Day then they just see their originally selected values (which would be what is submitted).
Note: DataCardValue2 is my Toggle control.
Start date: if all day then submit the selected date component only, otherwise submit selected date and time.
If(DataCardValue2.Value,
DateValue1.SelectedDate,
DateValue1.SelectedDate
+ Time(
Value(HourValue1.Selected.Value),
Value(MinuteValue1.Selected.Value), 0
)
)
End date: if all day then submit the selected date with the time set to 23:59, otherwise submit selected date and time.
If(DataCardValue2.Value,
DateValue2.SelectedDate
+ Time(23, 59, 0),
DateValue2.SelectedDate
+ Time(
Value(HourValue2.Selected.Value),
Value(MinuteValue2.Selected.Value), 0
)
)
Sorry for the long winded response. I tend to overexplain.