Process multiple data array to promise.all within loop method

I wrote javascript that process input from user via html checkbox, two Datepicker input, and two time input. User should choose checkbox that they can choose only one or more, input two date for date range, and input two time range. After user input necessary info, they click button which call this function :

function clicked(){

    var localedarr = [];

    if($('input:checkbox[name=myListName]:checked').length > 0){


        alert("Check name First!!");

debugtwo() is next function that handle the data. Inside it, i write code like this

function debugtwo(arrName){     
    ...some variable processing         

    if(x=="" || y=="" || z=="" || a=="" || betweenDate(b,c)<1 || y<=x || x == y){
        alert("Invalid Field Detected!!");
            var startT = elm+getMillisecondFromClock(x);
            var endT = elm+getMillisecondFromClock(y);

            var promiseAlls =,i) =>{                  
                return Promise.all([
                    searchStart(startT, endT, eachName),
                    searchEnd(startT, endT, eachName)
            Promise.all(promiseAlls).then((allArrs) =>{                 
                if(final_arr.length == arrName.length*arrFor.length){                       

The problem is, when i send more than 1 checked value from checkbox, for example like two names, Promise.all only called like one times and only process first data from array. But when I only use 1 name, even with long date range from Datepicker, the promise method can handle that easily and return all correct data for Datatable.

My assumption is, the promise method not waiting arrFor.forEach, or rather arrFor.forEach loop not waiting promise to complete first? Is there anything wrong with my promise code?

FYI : arrFor is array of timestamp of each day picked formatted at 00:00:00, based on range of date picked from Datepicker.

toDate return custom date format, from timestamp.

searchStart,searchEnd asynchronously return value after calling API from device.

initDatatable to print final data to Datatable