Please help me. I already googled about this but I can't to find the exact solution.
I have two dropdowns, one for selecting "from date" & another to select "to date". For eg.: If I select 10 from "from date" dropdown, the options which is in "to date" less than 10 & 10 should be disabled in "to date" dropdown.
Note: Table rows which are in the Fiddle are not static 2 row. It may 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');
//target.find("option").prevAll("option[value='"+selected+"']").attr('disabled','disabled');
});
From date
To date