开发者

Why i am not able to clear the date input field when i do not need? using jquery

开发者 https://www.devze.com 2023-01-02 11:42 出处:网络
I have this code in the view to display datepicker for inpu开发者_JS百科t type.. Problem Is when I click on the textbox on the UI I can select the date its working fine..

I have this code in the view to display datepicker for inpu开发者_JS百科t type..

Problem Is when I click on the textbox on the UI I can select the date its working fine..

but when I am trying to clear the textbox its not going off its allways showing currect date and time..

Can anybody help me why its i am not able to make clear..

thanks


I am trying to understand when you want it cleared. This code will clear it whenever the input receives focus:

$("input[id^='exc-flwup-']").focus(function() {
    $(this).val('');
});

You can change focus to click if it should only clear when you click.


$('#your-input-text-id').val('');

0

精彩评论

暂无评论...
验证码 换一张
取 消