@kent-culpepper
To avoid delegation issues, try defining two context variables for the current day (midnight) and the next day (midnight) as DateTime based off of your Date only currently SelectedDate, then you can perform a LookUp to find the record that falls within that date range.
This should accurately match the Dataverse DateTime column with the DatePicker selection.
Here's how you can do this:
1. Set Context Variables for Current Day and Next Day as DateTime:
(do this right before the LookUp)
UpdateContext({
varCurrentDay: DateTimeValue(Text(dtDate_Daily.SelectedDate, "[$-en-US]yyyy-MM-dd") & "T00:00:00"),
varNextDay: DateTimeValue(Text(DateAdd(dtDate_Daily.SelectedDate, 1, TimeUnit.Days), "[$-en-US]yyyy-MM-dd") & "T00:00:00")
})
2. Perform the LookUp Using the Context Variables:
Calendar: LookUp(Calendars, Date >= varCurrentDay && Date < varNextDay)
This approach makes sure that the record's DateTime value falls within the specified range for the selected date.
It should only match the records that have a date component essentially equal to the selected date from the DatePicker control, as if ignoring the time component.
By using the greater than or equal (>=) and less than (<) operators, you can accurately identify the correct record without having to manipulate the DateTime column in Dataverse or resort to complex solutions like to create an additional DateOnly column in Dataverse Table that has the Date only component of the DateTime you already have and updating all the records you already have to match, and creating new records with a Date only and a DateTime.
Note that if you have multiple records that may match the same date range within the same day, you may have to use Filter instead of LookUp, and use other criteria to determine what would happen. Even if you resorted to creating a new DateValue only column in Dataverse, you still have to use Filter instead of LookUp if you need to process multiple potential same-date matches. The above idea may allow you to avoid having to create that additional DateOnly Dataverse column and still use LookUp or Filter without DateValue and without delegation issue.
See if it helps @kent-culpepper