Next Previous button controls in angular js

I am developing a hybrid mobile app using ionic framework.I have an ng-form on a view for the user to enter the details of a particular event.One of the fields is for entering amount.There is a validation in that field so that the entered amount should not be greater than a particular value.If it fails an alert is showing.I am doing the validation on ng-blur so as to get the method called whenever the focus is out of the field. The case is if i am entering an invalid amount and click on the next arrow of keyboard,alert is showing and keyboard is dismissed.But on clicking the OK button of alert,the focus is going to the next field.In my case,next field is a date field and date picker is showing.How can i avoid this and focus it on the same field..

.html file

`<label class="item item-input item-stacked-label">
                        <span class="input-label">Event Amount</span>
                        <span class="event-amount-span">
                            <span class="currency-symbol event-symbol add-currency-symbol">{{countrycurrency}}</span>
                            <input type="number" placeholder="49.99" ng-model="item.total" id="total" ng-blur="updateEventAmt()" >
                                </span>
                    </label>
<label class="item item-input"> <span class="input-label"
                        ng-if="!item.date"> {{date| date:'dd-MM-yyyy'}} </span> <input
                            type="date" ng-model="item.date" id="date" ng-focus={{focus}}>
                            </label> `

.js file

 $scope.updateEventAmt= function() {
    var valEvent = document.getElementById("total").value;
    if (Number(valEvent)) {
    $("#total").val(parseFloat(valEvent).toFixed(2));
    $scope.eventTotal=parseFloat(valEvent).toFixed(2);
  //this is the condition for checking the amount,if it fails alert will show
    if(parseInt(val1)< parseInt(val2)){
    $('#overlay').show();
    $('.message-popup.message-eventAlert').show();
    cordova.plugins.Keyboard.close();
    $('.message-custom-ok').on('click',function(){
                               $('#overlay').hide();
                               $('.message-popup.message-eventAlert').hide();
                               $("#total").val("");
    });