cancel
Showing results for
Did you mean:

## Change Date Picker Default Date

Hi,

Is there a way to change the Date Picker Default Date?  What I would like to show as the default date is the current date plus 5 business days.  Is this possible?

Joe

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

Here's a formula that will calculate todays date + 5 business days.

``````With({ startDate:Today(),
},
Switch(Weekday(startDate, StartOfWeek.Monday),
)
)``````

I have a post that describes how this formula works.

http://powerappsguide.com/blog/post/formulas-how-to-cope-with-weekends-public-holidays-in-date-calcu...

Also, you might consider voting for my idea here to include a built-in function to calculate business days.

10 REPLIES 10
Multi Super User

Set the default date property of the control to:

hope it helps !

Community Champion

DefaultDate:

Today() + 5

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Thank you very much for your help.   🙂  Your formula works great but I need to only count business days and not weekends.  Is that possible?

Thank you very much for your help.   🙂  Your formula works great but I need to only count business days and not weekends.  Is that possible?

Community Champion

Check this tutorial from Reza Dorani:

https://youtu.be/QVvhDe6puq0?t=31

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Community Champion

Check this tutorial from Reza Dorani:

https://youtu.be/QVvhDe6puq0?t=31

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Super User

Here's a formula that will calculate todays date + 5 business days.

``````With({ startDate:Today(),
},
Switch(Weekday(startDate, StartOfWeek.Monday),
)
)``````

I have a post that describes how this formula works.

http://powerappsguide.com/blog/post/formulas-how-to-cope-with-weekends-public-holidays-in-date-calcu...

Also, you might consider voting for my idea here to include a built-in function to calculate business days.

Thank you very much for your help.   🙂

Thank you so much for your help.  Impressive code and works awesome!  Thank you again!

Announcements

#### Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Check Out the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community.  We can't wait to see what you "cook" up!