Show a person's calendar when choosing from a list of persons

Hi, I have 3 tables courses, instructors and instructor_calendar. When I want to select an instructor for one of my courses I want to know if he is busy on the day the course is scheduled.

I tried to add a button to say "busy" but I have a problem with the instructor calendar, if the event the instructor has is added using an interval I don't see it when interogating using the api.(for example an instructor has an event from 12/12/2016 until 20/12/2016, if I search for the date 15/12/2016 I don't get a result)

So I was thinking when I choose an instructor from the list to show his calendar for the month the course is held but I have no idea how to aproach that.

Has anyone an idea? Or tried to do something similar?

Hi and Happy New Year!

I am working using JavaScript and jQuery, the code for getting informations from the database is listed below:

var api_url = 'https://api.knack.com/v1/objects/object_20/records/';
// preparing filters
var filters = [
{
"field":"field_187",
"operator":"is",
"value": instructor
},
{
"field":"field_189",
"operator":"is",
"value": date
}
];
// add to URL
api_url += '?filters=' + encodeURIComponent(JSON.stringify(filters));
var allcourses = getGeneralResponseAsObject(api_url);
console.log(allcourses);

But the problem is that I don't get in the response the events that have the date I am looking for in an interval. 

And I know it is because I am using the operator "is" for date field, but I have no idea what else to use.

 

Another idea would be to show the calendar for that instructor for the current month as you described earlier. So I think it would be helpful for me to know how to do it. 

I know that I can use the filter for the current month, but I don't know what to use if the date is another month than the current one.

The format of the date is not a problem because I can use jQuery code to shift it.

Can you help me with this?

Thank you. Sorry for the delay I am on my Christmas Holiday.

Yes something like that, but only for an instructor using his id and I am interested to see a certain day or at least a month using a date from a form I want to submit.