jQuery .prop(“disabled”, false) is not enabling an input

后端 未结 4 817
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-07 01:30

I\'m having a problem re-enabling an input after it has been disabled on the page load.

I\'m using two inputs to accept two dates, but I want it that the second input is

4条回答
  •  闹比i
    闹比i (楼主)
    2021-02-07 01:54

    Try with removeAttr like

    $("#date1-end").removeAttr("disabled");
    

    You can also try with prop like

    $("#date1-end").prop("disabled",false);
    

提交回复
热议问题