JQuery DatePicker ReadOnly

后端 未结 14 2325
温柔的废话
温柔的废话 2020-12-03 04:35

When I make my datepicker read-only, I see that the user cannot type anything into the text box.

$(\"#datepicker\").attr(\'readonly\', \'readonly\');
         


        
14条回答
  •  情话喂你
    2020-12-03 05:06

    If you're trying to disable the field (without actually disabling it), try setting the onfocus event to this.blur();. This way, whenever the field gets focus, it automatically loses it.

提交回复
热议问题