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

If a day is not in THIS week, button is disabled

Hello!

 

I have a datepicker called StartDate. What I want to achieve is that if a date in StartDate is not in THIS current week, button sets to disabled. How do I achieve that?

 

Thanks in advance

12 REPLIES 12

if(WeekNum(StartDate.SelectedDate, Monday) <> WeekNum(Today(), Monday), DisplayMode.Disabled, Edit)
   

yes

shoog
Dual Super User
Dual Super User

Only thing I can think of this happening is when you have a different timezone set up in your datepicker. Can you verify that it's set to DateTimeZone.Local ?

yes, It's set to "Local"

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.

Users online (1,335)