Hi, this is my first time responding to the community, but I had the exact same problem and resolved it using the automation feature.
Essentially, when someone enters a time card entry, the automation is triggered based on (adding or modifying) the "Date Worked" field in the Time Card table. After the date is entered, the automation has Quick Base to see if the "Date Worked" value falls between one of the (Payroll Calendar Table) "Beginning Date" and "End Date" values, each pair has an associated Payroll Period.
Once QB determines which record ID# row (where the Date Worked fell between a begin and end date on payroll calendar), it copies the Payroll Period (and any other associated fields) to a third, many-to-many table that is linked to both the Payroll and Time Card tables.
If you still are looking for a solution, I can provide screen shot details of the automation, relationships and tables.