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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using calendar functio...
Power Apps
Unanswered

Using calendar function to block out Start and finish dates of booking, plus dates in between

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I currently have a power app built and code setup, so when someone makes a booking, it shows the booking dates as booked. However, it is only showing the start and end dates as booked, not the dates in-between. As below:

LW97_0-1715077731085.png

Here is my code, what could I add into this, to make the 9th also show as booked?

 

Set(_dateSelected, DateAdd(_firstDayInView, ThisItem.Value, TimeUnit.Days));

If (Toggle1.Value = true, Set(_calendarVisible, false);

ClearCollect(DayViewData,SortByColumns(Filter('Production Booking System','Created By'.Email = User().Email &&
(DateTimeValue(Text('Collection Date & Time',"dd/mm/yyyy"),"en-GB") >= DateTimeValue(Text(DateFrom.SelectedDate,"dd/mm/yyyy"),"en-GB") &&
DateTimeValue(Text('Return Date & Time',"dd/mm/yyyy"),"en-GB") <= DateTimeValue(Text(DateTo.SelectedDate,"dd/mm/yyyy"),"en-GB")
||
(DateTimeValue(Text('Return Date & Time',"dd/mm/yyyy"),"en-GB") >= DateTimeValue(Text(DateFrom.SelectedDate,"dd/mm/yyyy"),"en-GB") &&
DateTimeValue(Text('Return Date & Time',"dd/mm/yyyy"),"en-GB") <= DateTimeValue(Text(DateTo.SelectedDate,"dd/mm/yyyy"),"en-GB")) )

),"CollectionDateTime", SortOrder.Ascending));


,Set(_calendarVisible, true);

ClearCollect(DayViewData,SortByColumns(Filter('Production Booking System',(Text('Collection Date & Time',"dd/mm/yyyy") = Text(_dateSelected,"dd/mm/yyyy"))
|| (Text('Return Date & Time',"dd/mm/yyyy") = Text(_dateSelected,"dd/mm/yyyy"))


),"CollectionDateTime", SortOrder.Ascending));

)

 

 

Thanks!

Categories:
I have the same question (0)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard