web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Date Picker: Not Allow...
Power Apps
Answered

Date Picker: Not Allow to Pick Friday if its Thursday evening

(0) ShareShare
ReportReport
Posted on by 53

I want to Build a Powerapp where it can Only be saved or Datepicker can only be picked if its not Thursday evening or Firday itself. 

Is there any way this is possible.

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Probably, but your request is not super clear. If just want save button, and datepicker control disabled Thursday Evening through Saturday morning, that is simple enough.

     

    If you want save button disabled if thursday or friday is selected on datepicker control, also simple but diff formula.

     

    So let us know more in detail all the steps you are hoping to achieve

  • KT03 Profile Picture
    53 on at

    Good morning Rob,

     

    How exactly do I need to do this? I have never been in the need to use Date Picker, so I have no experience with it. My PowerApp will have a save button and a pop up window at the end if that helps.

    If possible, I need a form that doesn't allow Thursday night and all of Friday of the same week to be selected or saved if it is Thursday night or Friday. I was thinking of a calculated form where you can't select the next day if it is 12 hours ahead, but don't know if that would even work.


    Thanks in advance 

  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    If I understand the request here are some ideas.

     

    On the submit button to the form you can put this in display mode

    Switch(Weekday(Today()),
     5, DisplayMode.Disabled,
     6, DisplayMode.Disabled,
     DisplayMode.Edit)

     

    This disables forms submit button on Thursday & Friday

     

    For DatePicker you can set the default to

     

    If(Weekday(Today())=1,
     DateAdd(Today(),1,Days),
     Weekday(Today())=2,
     Today(),
     DateAdd(Today(), Sum(2-Weekday(Today())), Days))

     

    Which makes default date on the datepicker Monday of the current week

     

    Then in the onchange place this

    If(Weekday(Self.SelectedDate)=6 || Weekday(Self.SelectedDate)=5, Reset(Self))

     

    which resets the datepicker to monday if someone attempts to choose thursday or friday off of it

     

     

     

  • KT03 Profile Picture
    53 on at

    What do I need to change on the onchange formuar so that it only resets if it is the current week but not a week in the future?

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Add in a || Week(Self.SelectedDate) = Week(Today())

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard