title: dynamically enabling dates of the datepicker
body: <p>Kindly help me to modify below prog so as to accept user input and enable/disable day of the datepicker.
  Example: currently Saturday and sunday are enabled. I would like to modify this prog to read numbers(0  to 6) from the user and enabling the dates.</p>
  
  <p><a href="http://jsfiddle.net/jquerybyexample/q9dEB/" rel="nofollow">http://jsfiddle.net/jquerybyexample/q9dEB/</a></p>
  
  <pre><code>&lt;input type='text' id='txtDate' /&gt;
  
  $(function () {
      $('#txtDate').datepicker({
          beforeShowDay: function (dt) {
              return [dt.getDay() == 1 || dt.getDay() == 2, ""];
          }
      });
  });
  </code></pre>