Here is the code I am facing problem with:
<input type="text" data-ng-model="TODATE" data-ng-change="setTdate()" name="date" class="form-control datepicker" id="todate" data-date-container="#cal" data-provide="datepicker" data-date-format="mm-dd-yyyy" placeholder="mm-dd-yyyy" />
code in controller:
$scope.setTdate = setTdate;
function setTdate()
{
alert("working");
}
I am using input type as text for bootstrap datepicker, and wants to call a function on selecting a date. The ng-change event is not working when the page initially loads but as i refresh the page it works fine. There is no warning or error on debug.