Here's my code:
function display() {
$(document).ready(function () {
var txtStart = $("#TextBox1");
var txtStartDate = $(txtStart).val(); //Value from arrival
var txtEnd = $("#TextBox2");
var txtEndDate = $(txtEnd).val();
var minDate = new Date(txtStartDate);
var maxDate = new Date(txtEndDate);
$("#slider").slider({
min: minDate.getTime(),
max: maxDate.getTime(),
step: 60 * 60 * 24 * 1000, // 1 day
slide: function (e, ui) {
var currentDate = new Date(ui.value);
$('#now').text(currentDate.toDateString());
},
change: function (e, ui) {
/*I want to run the code behind function here*/
}
});
});
}