开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜