jquery - How can I pass a variable into a Date picker onSelect function -
basically accomplish having variable value inside onselect function. value set in dom ready function. need variable execute function called checkdates everytime there change in date picker.
jquery(function(){ var myvar = 'xzy'; }); $("#periodstartdate").datepicker({ onselect: function(datetext) { console.log(myvar); checkdates(this.value, $('#effectivestartdate').val(), myvar); } });
var myvar; jquery(function(){ myvar = 'xzy'; }); $("#periodstartdate").datepicker({ onselect: function(datetext) { console.log(myvar); checkdates(this.value,$('#effectivestartdate').val(),myvar); } });
Comments
Post a Comment