i like to implement this function:
if the user click on the start date input so pop up the datapicker window and the user click on the date so input have value and the intervall input disabled false:
Here my thought:
and hier my jQuery Code:
jQuery('#dp1').on('keyup', function() {
console.log(jQuery(this).val().length);
if(jQuery(this).val().length == 0) {
jQuery('#intervall').prop('disabled', true);
}else{
jQuery('#intervall').prop('disabled',false);
}
})
i don't know why this not working :(
Here is my jsFiddle:
Hope someone can help me.
Use this code
jQuery('#dp1').fdatepicker();
jQuery('#dp1').on('change', function() {
console.log(jQuery(this).val().length);
if(jQuery(this).val().length == 0) {
jQuery('#intervall').prop('disabled', true);
}else{
jQuery('#intervall').prop('disabled',false);
}
})