
Announcements
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:
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!