Forum Discussion
Set default date on DatePicker from a drop down control event
- Jun 15, 2022
TRundle2022 yes you can set the DefaultDate property to change based on the selection in the dropdown. Make sure you have set the first item in the dropdown to "" then set the DefaultDate property of the date picker to:
If(Dropdown1.Selected.Value <> "",Today()+10,Today())Or you can do something like this to set it to a date based on which item in the dropdown has been selected:
If(Dropdown1.Selected.Value ="Anguilla",Today()+10,If(Dropdown1.Selected.Value= "Antigua",Today()+20, Today()+30))Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)
TRundle2022 yes you can set the DefaultDate property to change based on the selection in the dropdown. Make sure you have set the first item in the dropdown to "" then set the DefaultDate property of the date picker to:
If(Dropdown1.Selected.Value <> "",Today()+10,Today())
Or you can do something like this to set it to a date based on which item in the dropdown has been selected:
If(Dropdown1.Selected.Value ="Anguilla",Today()+10,If(Dropdown1.Selected.Value= "Antigua",Today()+20, Today()+30))
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)
RobElliott Thank you. When I used the first formula, it threw an error, 'Value' isn't recognized. I changed the formula to If(Dropdown1.SelectedText.Value <> "",Today()+10,Today()), and that worked.
Thank you