Fiddle
Please help me. I have already searched for this information, but I cannot find the exact solution.
I have two drop-down lists: one for selecting "from date", and the other - to date. For example: If I select 10 from the “from date” drop-down list, the parameters located in “by date” of less than 10 and 10 should be disabled in the “by date” drop-down list.
Note. The table rows that are in the script are not static 2 rows. It may be 3 or more than
Here is my code
$(".tfdate").change(function() {
var target = $(this).parent().siblings().find("select.ttdate");
target.find("option").removeAttr("disabled");
var selected = $(this).val();
target.find("option").prevUntil("option[value='"+selected+"']").attr('disabled','disabled');
});
From date

Today

source
share