I need to un check a checkbox (if it has been checked) if another text input has a value (M/DD/YYY format). I am using glDatePicker to set the value for #StartDate, the content brought in via ajax so Im using the '.on' funciton
<div id="bottomContent">
<input type="text" id="StartDate" name="StartDate"><br />
<input type="text" id="EndDate" name="EndDate"><br />
<label for="AllDate"><input type="checkbox" name="AllDate" id="AllDate">All Dates</label>
</div>
$(function() {
$('#bottomContent').on('change', '#StartDate', function(e){
var value = $(this).val();
if ( value.length > 0 ) {
//$('#AllDate').prop('checked', false);
console.log('hi');
}
});
});
Im pretty sure i have my parameters messed up in the .on arguments.