AP is a permission to enter into USA, it doesnt give the length of legal stay in USA.
If you have a pending i485, you can stay legally in USA as long as its pending(you dont even need an EAD or AP for this). The same rule is applied for your dependents whose i485 is in pending state.