title: How to fix 2 datepicker displaying for single textbox?
body: <p>Hi I using Datepicker to choose start date and end date in popup.</p>
  <p>But for the start date,it is showing 2 date picker, but for End date it is working fine with single date picker. How to fix it?</p>
  <p>Codes below:</p>
  <pre><code>&lt;div id=&quot;SelectDates&quot; class=&quot;response-msg confirm ui-corner-all&quot; style=&quot;display: none&quot;&gt;
  &lt;div class=&quot;row&quot;&gt;
  &lt;div class=&quot;col-12 col-lg-12&quot;&gt; &lt;div class=&quot;form-control-stack required&quot;&gt;
  &lt;label for=&quot;&quot; class=&quot;font-weight-medium&quot; id=&quot;lblStatusMsg&quot;&gt; Start Date&lt;/label&gt;
  @{Html.RenderAction(&quot;RequestDatePicker&quot;, &quot;Base&quot;, new { id = &quot;txtstartdate1&quot;, sStatusDate = &quot;&quot; });}
  &lt;/div&gt;&lt;/div&gt;
  &lt;div class=&quot;col-12 col-lg-12&quot;&gt; &lt;div class=&quot;form-control-stack required&quot;&gt;
  &lt;label for=&quot;&quot; class=&quot;font-weight-medium&quot; id=&quot;lblStatusMsg1&quot;&gt; EndDate&lt;/label&gt;
  @{Html.RenderAction(&quot;RequestDatePicker&quot;, &quot;Base&quot;, new { id = &quot;txtenddate&quot;, sStatusDate = &quot;&quot; });}
  &lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;input autofocus type=&quot;hidden&quot;&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Java script as follows:</p>
  <pre><code>$(&quot;#SelectDates&quot;).attr('title', 'Select Dates');
  
           $(&quot;#datepicker_txtstartdate1&quot;).datepicker('setStartDate', new Date(Highlighted_StartDate));
          $(&quot;#datepicker_txtstartdate1&quot;).datepicker('setEndDate', new Date(Highlighted_EndDate));
  
   $(&quot;#datepicker_txtenddate&quot;).datepicker('setStartDate', new Date(Highlighted_StartDate));
          $(&quot;#datepicker_txtenddate&quot;).datepicker('setEndDate', new Date(Highlighted_EndDate));
  
  $(function () {
              $(&quot;#SelectDates&quot;).dialog({
                  resizable: false,
                  position: 'center',
                  height: 250,
                  width: 400,    
   close: function (event, ui) {
                    
                      if (document.getElementById(&quot;datepicker_txtstartdate1&quot;).value != &quot;&quot; &amp;&amp; document.getElementById(&quot;datepicker_txtenddate&quot;).value != &quot;&quot;)
                      { 
                      if (GetDate()) {                     
                             var SD= document.getElementById(&quot;datepicker_txtstartdate1&quot;).value;
                             var ED= document.getElementById(&quot;datepicker_txtenddate&quot;).value;
                         
                          $(this).parent().find('.ui-dialog-buttonpane').remove();
                        }
                      }
                   
                  },
                  modal: true,
  });
          });
  </code></pre>
  <p><strong>StartDate Image below:</strong></p>
  <p><a href="https://i.stack.imgur.com/wqci2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wqci2.png" alt="enter image description here" /></a></p>
  <p><strong>End Date Image below:</strong></p>
  <p><a href="https://i.stack.imgur.com/PEHDw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PEHDw.png" alt="enter image description here" /></a></p>