title: Disable all select option depend upon array
body: <p>i have an multi select box given below:
  Please First see that.</p>
  
  <p>My code:</p>
  
  <pre><code>$("select option:contains( " + data + ")").attr("disabled","disabled"); 
  </code></pre>
  
  <p>only helps to disable select option only if data has only one value(not in array)</p>
  
  <p>Here is the problem:</p>
  
  <pre><code>var data =  31/8/2018,30/9/2018
  
  
  I want to disable select options having values == data ,
  </code></pre>
  
  <p>so maybe, we need a loop which check data[1] == first  option then second then third etc
  if values matched, that value will be disabled.</p>
  
  <p>then check data[2] == first option then second then third ...etc
  if values matched, that select option will be disabled.</p>
  
  <p>Result:: Ex. First two option ll be disable
  Is that Possible</p>
  
  <pre><code>&lt;select class="form-control" multiple="" name="month[]" id="month"&gt;
   &lt;option value="31/8/2018"&gt;  1 @ 31/8/2018   &lt;/option&gt;
   &lt;option value="30/9/2018"&gt;  2 @ 30/9/2018   &lt;/option&gt;
   &lt;option value="31/10/2018"&gt; 3 @ 31/10/2018  &lt;/option&gt;
   &lt;option value="30/11/2018"&gt; 4 @ 30/11/2018  &lt;/option&gt;
   &lt;option value="31/12/2018"&gt; 5 @ 31/12/2018  &lt;/option&gt;
  &lt;/select&gt;
  
  $("select option:contains( " + data + ")").attr("disabled","disabled");
  </code></pre>