Skip to content

Instantly share code, notes, and snippets.

@jhilden
Created November 25, 2010 17:20
Show Gist options
  • Save jhilden/715662 to your computer and use it in GitHub Desktop.
Save jhilden/715662 to your computer and use it in GitHub Desktop.
// -- datepicker --
// booking
$('#booking_start_date').datepicker({
onSelect: function(dateText, inst) {
$('#booking_end_date').datepicker("option", 'minDate', new Date(dateText));
},
beforeShowDay: disableUnavailableDays,
dateFormat: 'dd-mm-yy'
});
$('#booking_end_date').datepicker({
beforeShowDay: disableUnavailableDays,
dateFormat: 'dd-mm-yy'
});
// search
$('#search_start_date').datepicker({
onSelect: function(dateText, inst) {
$('#search_end_date').datepicker("option", 'minDate', new Date(dateText));
},
dateFormat: 'dd-mm-yy'
});
$('#search_end_date').datepicker({ dateFormat: 'dd-mm-yy' });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment