Adding Locations to Scheduler

Hi all,

I’m quite new to JS & still learning the ropes, so please understand if this is a bit of a silly question! I’m currently looking at the Car Booking Scheduler, am looking at how to include locations.

I’ve added a new table ‘locations’ in SQL which has two columns (ID, Label) & two new columns to the ‘rents’ table (pickup, dropoff) and would like to be able to set a pick up and drop off location when scheduling, and also have this table reference by a filter (see only vehicles that are booked to a specific location).

I’ve had a bit of a look at the code and documentation but seem to be missing something, because I can’t quite grasp what I need to do.

My understanding for adding the filter:

  • Adjust index.html and add a new field-set (relatively simple)
  • Query the database for a list of locations (?)
  • Define the locations as a variable that can be passed to PushCheckboxes()
  • Add a new filterbylocation function (reference the variable defined above?)

I’m just not sure how to go about querying SQL for the locations, and when I play with the filtering it causes errors with the other filters… I guess that’s because it has no data.

I’m probably overthinking this, but any help would be appreciated!

Cheers

The recommended approach to connect dhtmlxScheduler to a backend is to implement RESTful API on the server.
Here you can find a tutorial:
https://docs.dhtmlx.com/scheduler/server_integration.html