title: How to enable and disable an input field using knockout when there is a checkbox?
body: <p>I have a checkbox field and an input field (<code>endDate</code>). I want to enable and disable the <code>endDate</code> depends on the checkbox value (when the check box is checked the <code>endDate</code> is disabled and vice versa). I have the input and check box elements as follow:</p>
  
  <blockquote>
  <pre><code>&lt;input id="inUse" type="checkbox" data-bind="checked: inUse"/&gt;
  &lt;input id="endDate" data-bind="datepicker: enDate, enable: enableEndDate"/&gt;
  </code></pre>
  </blockquote>
  
  <p>enableEndDate:</p>
  
  <blockquote>
  <pre><code>self.enableEndDate = ko.computed(function(){
       return !inUse();
      }
  });
  </code></pre>
  </blockquote>
  
  <p>when the page is loaded, depends on the <code>inUse</code> field value, the <code>endDate</code> would be enabled or disabled. When I uncheck the <code>inUse</code> the <code>endDate</code> would be enabled. 
  Now I want to enable a disabled <code>endDate</code> when the user click on it and then change the value of <code>inUse</code> to unchecked at the same time. How can I bind this two way process? </p>