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 allow only...
Power Apps
Answered

Date picker allow only certain days

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a date picker where the default date will be a Thursday and users are only allowed to select Thursdays.

I can create a textbox for the second part if I can't disable others, but I don't know how to set to only Thursdays.

Help will be greatly appreciated.

Categories:
I have the same question (0)
  • Verified answer
    CarlosFigueira Profile Picture
    Microsoft Employee on at

    Currently the DatePicker control doesn't support limiting the dates that the user can select by week day (you can limit the year range that can be selected). Please consider creating a new feature request in the PowerApps Ideas board for this.

     

    An alternative for your scenario would be to display some sort of visual indication that the selected date is invalid. For example, you can have this formula for the BorderColor property of the date picker:

    If(Weekday(DatePicker1.SelectedDate, StartOfWeek.Sunday) <> 5, Color.Red, RGBA(101, 128, 187, 1))

    That will set the border of the picker to red if the date is incorrect. You can also have a label that tells the user what the problem is, for example, using this formula for its Text property:

    If(Weekday(DatePicker1.SelectedDate, StartOfWeek.Sunday) <> 5, "Chosen date must be a Thursday")
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Perfect. All sorted now Smiley Happy

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    For some reason, the above-mentioned solution does not work for me. Albeit my purpose is slightly different then the OP's, my intentions are the same; I wish to let users know if they have chosen an invalid date, i.e. a non-Tuesday.

     

    If(Weekday(SelectedDate, StartOfWeek.Monday) = 2, Color.Red, RGBA(101, 128, 187, 1))

     

    But the BorderColor returns with an error, stating that the Weekday function has some "invalid arguments". Any thoughts as to why that might be?

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard