What I am trying to do :
I am trying to set the startDate and endDate params depending on the current value of year. I think that currenty what I have just sets the
Change the values of option
2013-2014 and 2015-2016 like
Change this to js,
var myStartDt;
function mydatepicker(){
myStartDt= $('#myStartDate')
.datepicker({
startDate: getStartDate(),
endDate: getEndDate()
}).on('changeDate', function (ev) {
myStartDt.hide();
}).data('datepicker');
}
$("#mySelect").on('change',function(){
// alert(this.value)
$('#myStartDate').datepicker("remove");
mydatepicker();//$('#id-element').datepicker("destroy");
});
mydatepicker();
Fiddle