I'm trying to block the click on a input
Html
<input id="txtData" class="form-control" /><span class="input-group-addon" data-role="data"><i class="glyphicon glyphicon-th"></i></span>
So that no action happens when input
is clicked, I tried the following code and I did not succeed.
$('#txtData').click(function (event) {
event.preventDefault();
event.stopPropagation();
return false;
});
* obs: I already tried with delegate
and onclick
too.
I have datepicker
bounded in input
, it fires when I click somewhere else ( $('#txtData').datepicker("show");
), I've also searched for properties of datepicker
and have none that leave it invisible or something like , possibly click on datepicker
before executing my jquery
function, would you have any way to block 100% click, before, during and after, any suggestions?