问题描述:

I'm using multiselect dropdowlist and i want to disable item which is select first dropdown list.

I have lots of googling but not see any correct solution which i want.

my code below

<table>

<tr>

<td>

<select class="form-control" id="day_list_1" multiple="multiple" name="shift[day_list_1][]">

<option value="Sunday">Sunday</option>

<option value="Monday">Monday</option>

<option value="Tuesday">Tuesday</option>

<option value="Wednesday">Wednesday</option>

<option value="Thursday">Thursday</option>

<option value="Friday">Friday</option>

<option value="Saturday">Saturday</option>

</select>

</td>

<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

</td>

<td>

<select class="form-control" id="day_list_2" multiple="multiple" name="shift[day_list_2][]">

<option value="Sunday">Sunday</option>

<option value="Monday">Monday</option>

<option value="Tuesday">Tuesday</option>

<option value="Wednesday">Wednesday</option>

<option value="Thursday">Thursday</option>

<option value="Friday">Friday</option>

<option value="Saturday">Saturday</option>

</select>

</td>

</tr>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>

<link href="~/Content/jquery.multiselect.css" rel="stylesheet" />

<script src="~/Scripts/jquery.multiselect.js"></script>

<style type="text/css">

.form-control

{

width: 130px;

height: 130px;

}

</style>

<script>

$('select[multiple]').multiselect({

columns: 1,

placeholder: 'Select options'

});

$(document).ready(function () {

});

</script>

somthing like this

how to disable dropdown options based on the previously selected dropdown values in multi select dropdown?

相关阅读:
Top