I sat down and had a look at this again, and found a way to implement this.
At first, I tried using the fullcalendar Drupal plugin, but it proved to be unnecessarily complex for this particular functionality, plus it wasn't very clear how to add the output of the fullcalendar plugin to the pane. The commerce extra panes wasn't that useful in this case, either.
So here's what I did:
1) I created a module where I set up a custom pane. Here's the part of the module that set up the commerce checkout pane:
function custom_checkout_commerce_checkout_pane_info() {
$panes = array(
'custom_checkout_date' => array(
'title' => t('Select a date'),
'base' => 'custom_checkout_date_pane',
'page' => 'route_date', // default checkout page
'weight' => -5,
'file' => 'includes/pane_route_date.inc' // Form functions
)
);
return $panes;
}
Here's what is included in the pane itself:
function custom_checkout_route_date_pane_checkout_form($form, &$form_state, $checkout_pane, $order) {
$pane_form['route_calendar'] = array(
'#type' => 'container',
'#id' => 'route_calendar'
);
$pane_form['selected_date'] = array(
'#type' => 'hidden',
'#id' => 'selected_date'
);
return $pane_form;
}
The hidden field "selected_date" stores the result of the calendar, which is then added to the order.
I then added fullcalendar to the Drupal libraries folder, and added it to the page where the fullcalendar pane is placed using drupal_add_js.
I then created an AJAX callback page, which is used to return the available dates that match the parameters given in the order by the customer.
I then added a click handler for each event, by overriding the Fullcalendar eventClick callback. Thus, when the user clicks on an event, it sets the event date in the hidden field and submits the current commerce checkout pane, moving on to the next.
Thus, I finally did find out what to do, but it required a lot of fiddling around, and a lot of the parts I did weren't documented so well, or didn't have any good examples to follow :(
Anyway, the problem in this question is now resolved, I hope this helps anyone that is trying to tackle the same (or similar) issues with the checkout part of Drupal commerce.