Skip to content

Instantly share code, notes, and snippets.

@vijaycs85
Created April 2, 2013 15:51
Show Gist options
  • Save vijaycs85/5293307 to your computer and use it in GitHub Desktop.
Save vijaycs85/5293307 to your computer and use it in GitHub Desktop.
// Default horizon date.
$horizon_days = 90;
if (!empty($wrapper) && is_object($wrapper)) {
$horizon_days = $wrapper->getBookingHorizon();
// Check if we have to ask for time
if (!$wrapper->isBookableByDay()) {
$default_details['ask_time'] = TRUE;
}
}
// Settings for calendar picker
drupal_add_js(array('datePicker' => array('maxDate' => '+' . $horizon_days . 'd')), 'setting');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment