开发者

jquery mouse double click on text box not preventing values from browser cache

I have a Date Input text box generated by jquery Date Picker which is only meant to display dates from the current date.

Howeve开发者_运维问答r if a user has used the form previously, he is able to choose previous dates generating from which on double clicking displays a choice of dates from his browser cache.

This would help a user book dates that are prior to current dates. I am solving it using a sever side check. However is there a way I can prevent this. I tried preventing double clicks based on all suggestions in this link, but no avail

1]http://stackoverflow.com/questions/5241981/disable-mouse-double-click-using-javascript-or-jquery


Try adding autocomplete="off" to your <input> element. This will prevent the browser from showing previously entered values.

You should also validate the date server side to ensure nothing slips through the client side net.


Do not put your dateinput in the <form> you submit your search with, but populate a hidden input on submit. You will not be able to prevent browsers from caching data of your dateinputs if they actually are part of the form submit your search with.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜