Notifications
Announcements
Hi
I want to pick the date of the current week date form the date picker user to not able to select past week date or else future date.
May I know how to achieve this.
Thank you
hey @SathyaKrihnsa
i use this code to only allow this month or the previous one.
If(And(Month(Today())<>Month(Self.SelectedDate),Month(DateAdd(Today(),-1,TimeUnit.Months))<>Month(Self.SelectedDate)), Notify("You can only send comments for this or the previous month.",NotificationType.Error,4000); Reset(Self))
maybe you can modify to ur needs
Let me know if my answer helped solving your issue.If it did please accept as solution and give it a thumbs up so we can help others in the community.Greetings
hi @SathyaKrihnsa ,
you can use this code to restrict users from selecting 7 days future or 7 days past:
If( Abs( DateDiff( Self.SelectedDate, Today(), TimeUnit.Days ) ) > 7, Reset(Self) && Notify("please select correct date") )
Let me know if my answer helped solving your issue.
If it did please accept as solution and give it a thumbs up so we can help others in the community.
Hi @SathyaKrihnsa ,
I am guessing you are wanting the calendar week - if so, try this on the OnChange of the Date Picker
If( WeekNum( Self.SelectedDate, StartOfWeek.Monday ) <> WeekNum( Today(), StartOfWeek.Monday ), Notify( "Only this week can be chosen", NotificationType.Error ); Reset(Self) )
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
Hi i want to set Friday date for current week of which where date is selected for the current week
how can i achieve this
@SathyaKrihnsa ,
So do you want Monday to Friday of the current week ?
For the current week should be Monday to Sunday period which ever date is selected in the current week the date automatically populate should be Friday date of the current week and restrict to not select the any past week or future week .
Please Help the Solution
The DefaultDate of the Friday of the current week should be
DateAdd( Today(), 5 - Weekday( Today(), StartOfWeek.Monday ) )
This is a separate setting to the OnChange (which I am wondering why you are bothering with as you are setting the DefaultDate, which they can change
Hi for the Current week Monday to Sunday period which ever date is Selected the date should show the current week of Friday date .
Ex-1 in this picture if the user selects the 9th date , 3rd ,5th selects it should populate the 7th date(Friday) only and Restrict to not to select the past week date or future week date .
@SathyaKrihnsa ,As I mentioned putting in the DefaultDate of what I posted will do that without the user selecting anything, so why bother selecting ?
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 765 Most Valuable Professional
Michael E. Gernaey 343 Super User 2025 Season 2
Power Platform 1919 272