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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,410)