title: How to update Time Restraints in Timepicker plugin?
body: <p>I'm using Timepicker plugin: <a href="http://trentrichardson.com/examples/timepicker/" rel="nofollow">http://trentrichardson.com/examples/timepicker/</a> . I want to update Time Restraints after date was changed. This's my code:</p>
  
  <pre><code>var date = "10/02/2013";  // October, 02 2013
  var time = "22:05";
  $("#Date").datepicker({
                      minDate: 'today',
                      maxDate: date,
                      showOn: "button",
                      buttonImage: '@Url.Content("~/Images/Library/Calendar.png")',
                      buttonImageOnly: true,
                      onSelect: function (dateText) {
                          if (Date.parse(dateText) == Date.parse(date)) {
                              $('#Time').timepicker({
                                  hourMax: time.split(':')[0],
                                  minuteMax: time.split(':')[1]
                              });
                          }
                          else {
  
                              $('#Time').timepicker({
                                  hourMax: 23,
                                  minuteMax: 59
                              });
                          }
                      }
                  });
  </code></pre>
  
  <p>I try to do it, but it doesn't work</p>