title: How to set max date in a kendodatepicker every time another date is chosed
body: <p>i have two kendodatepickers &quot;startDate&quot; and &quot;endDate&quot;. I want every time the user set a date in startdate, establish the max date one month forward from the selected date to pick in endDate datepicker.</p>
  <p>I am setting up the first time in this way:</p>
  <pre><code> $(&quot;#datStartDate&quot;).kendoDatePicker({
          start: &quot;month&quot;,
          depth: &quot;year&quot;,
          format: &quot;dd/MM/yyyy&quot;,
          dateInput: true,
          change: (e) =&gt; {                
              return moc.rangeStartDate(&quot;datStartDate&quot;, &quot;datEndDate&quot;);
          },
          min: new Date(1900, 0, 1),
          max: new Date(),
          value: new Date()
      });
  
      $(&quot;#datEndDate&quot;).kendoDatePicker({
          start: &quot;month&quot;,
          depth: &quot;year&quot;,
          format: &quot;dd/MM/yyyy&quot;,
          dateInput: true,
          max: new Date(),
          change: (e) =&gt; {
              return moc.rangeEndDate(&quot;datStartDate&quot;, &quot;datEndDate&quot;);
          },
          value: new Date()
      });
  </code></pre>
  <p>I tried this to set the max value, each time the startDate picker is cheanged:</p>
  <pre><code>$(&quot;#datStartDate&quot;).change(() =&gt; {
          let startDate = ($(&quot;#datStartDate&quot;).val()).split(&quot;/&quot;);
          console.log(&quot;cambio de fecha&quot;, parseInt(startDate[2]), parseInt(startDate[1]), parseInt(startDate[0]))
          let datePicker = $(&quot;#datEndDate&quot;).data(&quot;kendoDatePicker&quot;);
          datePicker.max(new Date(parseInt(startDate[2]), parseInt(startDate[1]), parseInt(startDate[0])));
          datePicker.value(new Date(parseInt(startDate[2]), parseInt(startDate[1]), parseInt(startDate[0])))
      })
  </code></pre>
  <p>It doesnt works and i dont get an error. How can i do this? Thank you so much for you time.</p>
  <p>I am using this:</p>
  <ul>
  <li>KendoUI</li>
  <li>JavaScript</li>
  <li>ASP .NET MVC</li>
  <li>RAZOR</li>
  <li>jquery</li>
  </ul>