I'm using the clockpicker plugin in a page the clock can be enabled or disabled dinalically without reloading the entire page. So, when I load the page I initialize only if its enabled.
$(document).ready(function () {
configureClockPickers();
});
function configureClockPickers(){
$('.clockpicker').each(function(){
$(this).clockpicker({autoclose: true});
}
}
if the input is dinamically enabled (calling again to my function configureClockPickers() the clock is displayed perfectly.
Problem appears when the inputs is dinalically disabled. I don't know how to stop displaying the clock when the clock icon is clicked (if the disabled input is clicked no clock is displayed).
My clock is generated as follows:
<div id="clock" class="input-group clockpicker" data-placement="left" data-align="top">
<form:input path="clock1" id="clock1" type="text" cssClass="form-control inputForm inputClock"/>
<span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span>
</div>
Any idea?
Thank you so much!