cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Robertjde
Helper V
Helper V

Datepicker function

Hello everyone
I want my date picker to show the date of Monday of the current calendar week. Does anyone have a solution for this?

Thanks for the support

1 ACCEPTED SOLUTION

Accepted Solutions
v-yujincui-msft
Community Support
Community Support

Hi @Robertjde ,

 

Try to select the Date Picker Control and apply the following formula on its DefaultDate property as:

Switch(Weekday(Today(),StartOfWeek.Monday),
2,DateAdd(Today(),-1),
3,DateAdd(Today(),-2),
4,DateAdd(Today(),-3),
5,DateAdd(Today(),-4),
6,DateAdd(Today(),-5),
7,DateAdd(Today(),-6),
Today()
)

Result Screenshot:

vyujincuimsft_0-1652250390822.png

 

 

Best Regards,

Charlie Choi

View solution in original post

2 REPLIES 2
v-yujincui-msft
Community Support
Community Support

Hi @Robertjde ,

 

Try to select the Date Picker Control and apply the following formula on its DefaultDate property as:

Switch(Weekday(Today(),StartOfWeek.Monday),
2,DateAdd(Today(),-1),
3,DateAdd(Today(),-2),
4,DateAdd(Today(),-3),
5,DateAdd(Today(),-4),
6,DateAdd(Today(),-5),
7,DateAdd(Today(),-6),
Today()
)

Result Screenshot:

vyujincuimsft_0-1652250390822.png

 

 

Best Regards,

Charlie Choi

Robertjde
Helper V
Helper V

@v-yujincui-msft  Thanks for your support 👍

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

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