title: Textbox property change not working jQuery
body: <p>I have a drop down using this drop-down i trying to change the property. When first time page load it is working fine. Let's say if I select <strong>TEXT</strong> Works fine, if I <strong>Number</strong> works fine <strong>BUT when select "Date" and then after</strong> "Number" the textbox shows CALENDAR AS WELL AS NUMBER. Please see the image
  <a href="https://i.stack.imgur.com/aQMVo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aQMVo.png" alt="enter image description here"></a></p>
  
  <pre><code>&lt;asp:DropDownList ID="dpType" runat="server" Visible="true"&gt;
  &lt;asp:ListItem Value="0"&gt;Select Type&lt;/asp:ListItem&gt;
  &lt;asp:ListItem Value="1"&gt;Text&lt;/asp:ListItem&gt;
  &lt;asp:ListItem Value="2"&gt;Number&lt;/asp:ListItem&gt;
  &lt;asp:ListItem Value="3"&gt;Date&lt;/asp:ListItem&gt;
  &lt;/asp:DropDownList&gt;
  </code></pre>
  
  <p>Here is my Jquery Code. I want to display calendar as shown in the image when my drop-down <strong>value is "3".</strong></p>
  
  <pre><code> $("#&lt;%= dpType.ClientID %&gt;").on('change', function () {
              //alert(this.value);
              var v = this.value;
              console.log(v);
              $("#&lt;%= txtTypeValue.ClientID %&gt;").prop("disabled", true); 
              if (v == '0' || v == 0) {
                  &lt;%--$("#&lt;%= txtTypeValue.ClientID %&gt;").html("");--%&gt;
                  $("#&lt;%= txtTypeValue.ClientID %&gt;").prop("disabled", true); 
                  $('#&lt;%= txtTypeValue.ClientID %&gt;').val("");
              }
  
              if (v == '1' || v== "1") {
                  $("#&lt;%= txtTypeValue.ClientID %&gt;").prop("disabled", false); 
                  $('#&lt;%= txtTypeValue.ClientID %&gt;').val("");
                  $('#&lt;%= txtTypeValue.ClientID %&gt;').removeClass();
                  $("#&lt;%= txtTypeValue.ClientID %&gt;").prop('type', 'text');
              } else if (v == '2' || v == "2") {
                  $("#&lt;%= txtTypeValue.ClientID %&gt;").prop("disabled", false); 
                  $('#&lt;%= txtTypeValue.ClientID %&gt;').val("");
                  $("#&lt;%= txtTypeValue.ClientID %&gt;").prop('type', 'number');
              } else if (v == '3' || v == "3") {
                  $("#&lt;%= txtTypeValue.ClientID %&gt;").prop("disabled", false); 
                  $('#&lt;%= txtTypeValue.ClientID %&gt;').val("");
                  //$("#&lt;%= txtTypeValue.ClientID %&gt;").prop('type', 'date');
                  $("#&lt;%= txtTypeValue.ClientID %&gt;").datepicker({
                      dateFormat: 'mm-dd-yy'
                  });
              }
          });
  </code></pre>