Thursday 19 November 2020

IE-11: Object doesn't support property or method 'parseInt'

My apps front end is built in angular js 1.4.14 and I am encountering the following error only in IE-11:

Object doesn't support property or method 'parseInt'

Here is my Html:

<div class="form-group">
     <label class="col-sm-2 control-label">Pickup time <span ng-show="pickupTimeIsRange()">range</span>:</label>
           <div class="row col-md-10">
                <div class="col-md-3">
                     <input placeholder="" class="form-control" ui-timepicker ng-model="info.pickup_time_start">
                </div>
                <div class="col-md-3" ng-show="pickupTimeIsRange()">
                     <input placeholder="End time" class="col-md-4 form-control" ui-timepicker ng-model="info.pickup_time_end">
                </div>
           </div>
</div>

And here is my js code:

info.pickup_time_start = getTime('start');
info.pickup_time_end = pickupTimeIsRange() ? getTime('end') : null;

function getTime(time) {
   return !_.has(info.pickup_time, time) || _.isEmpty(info.pickup_time[time])
        ? null
        : moment(info.pickup_time[time], 'HH:mm');
}

Now what is going wrong here? My code is compiled when the app is run so the above error occurs in lib.js file which is a compiled js code file from which I don't know where actually Number.parseInt is being used. is there anyway to force global parseInt to be used? Or is there anyway I can figure out where exactly Number.parseInt is being used? I know that much that this error pops up when the above code runs, like when ui-timepicker is executed, when I try to select time. So ui-timepicker is using Number.parseInt somewhere in the code which I am unable to figure out where exactly.

EDIT

By the way, it is working fine on my local with same browser, same code and same OS. That is very strange that on live instance it doesn't work! Why is that?



from IE-11: Object doesn't support property or method 'parseInt'

No comments:

Post a Comment