Created
February 17, 2013 00:39
-
-
Save gterrill/4969456 to your computer and use it in GitHub Desktop.
Do something when a date is selected, preserving BookThatApp's handling for availability purposes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
bta_callbacks = {}; | |
// invoked after availability data from BookThatApp is loaded via Ajax. | |
bta_callbacks["loaded"] = function(data) { | |
var onStartSelect = $('#booking-start').datepicker('option', 'onSelect'), | |
onFinishSelect = $('#booking-finish').datepicker('option', 'onSelect'); | |
$('#booking-start').datepicker('option', 'onSelect', function(date) { | |
onStartSelect.call(this, date); | |
}); | |
$('#booking-finish').datepicker('option', 'onSelect', function(date) { | |
onFinishSelect.call(this, date); | |
}); | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment