Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to disable time option in select jquery

$('#fromtime').on('change', function(){
    var totimeValues = [];
    
    var fromTime = $(this).val();

    $('#totime option').filter(function() {
        return $(this).val() <= fromTime;
    }).prop('disabled', true);

    
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #disable #time #option #select #jquery
ADD COMMENT
Topic
Name
6+3 =