I try to use date range like this
http://jqueryui.com/demos/datepicker/date-range.html
$(".txtDateRange").live("mouseover", function () {
var dates = $(".txtDateFrom, .txtDateTo").datepicker({
dateFormat: 'dd-mm-yy',
isBE: true,
autoConversionField: true,
changeMonth: true,
changeYear: true,
onSelect: function (selectedDate) {
var option;
if (this.id.indexOf('txtDateFrom') > -1)
option = "minDate";
else
option = "maxDate";
//Set Option
instance = $(this).data("datepicker"),
date = $.datepicker.parseDate(
instance.settings.dateFormat ||
$.datepicker._defaults.dateFormat,
selectedDate, instance.settings);
dates.not(this).datepicker("option", option, date);
}
});
});
But it doesn't work. What's wrong with this code.