St. John of Damascus is in some ways just repeating St. Augustine’s reflection made a couple hundred years before. If your interested in the subject from ancient Father’s this is really the place to go.
Chapter 47.— Predestination is Sometimes Signified Under the Name of Foreknowledge. Consequently sometimes the same predestination is signified also under the name of foreknowledge; as says the apostle, “God has not rejected His people whom He foreknew.” Romans 11:2 Here, when he says, “He foreknew,” the sense is not rightly understood except as “He predestinated,” as is shown by the context of the passage itself. For he was speaking of the remnant of the Jews which were saved, while the rest perished. For above he had said that the prophet had declared to Israel, “All day long I have stretched forth my hands to an unbelieving and a gainsaying people.” And as if it were answered, What, then, has become of the promises of God to Israel? He added in continuation, “I say, then, has God cast away His people? God forbid! For I also am an Israelite, of the seed of Abraham, of the tribe of Benjamin.” Then he added the words which I am now treating: “God has not cast away His people whom He foreknew.” And in order to show that the remnant had been left by God's grace, not by any merits of their works, he went on to add, “Do you not know what the Scripture says in Elias, in what way he makes intercession with God against Israel?” and the rest. “But what,” says he, “says the answer of God unto him? 'I have reserved to myself seven thousand men, who have not bowed the knee before Baal.'” Romans 11:5 For He says not, “There are left to me,” or “They have reserved themselves to me,” but, “I have reserved to myself.” “Even so, then, at this present time also there is made a remnant by the election of grace. And if of grace, then it is no more by works; otherwise grace is no more grace.” And connecting this with what I have above quoted, “What then?” Romans 11:7 and in answer to this inquiry, he says, “Israel has not obtained that which he was seeking for, but the election has obtained it, and the rest were blinded.” Therefore, in the election, and in this remnant which were made so by the election of grace, he wished to be understood the people which God did not reject, because He foreknew them. This is that election by which He elected those, whom He willed, in Christ before the foundation of the world, that they should be holy and without spot in His sight, in love, predestinating them unto the adoption of sons. No one, therefore, who understands these things is permitted to doubt that, when the apostle says, “God has not cast away His people whom He foreknew,” He intended to signify predestination. For He foreknew the remnant which He should make so according to the election of grace. That is, therefore, He predestinated them; for without doubt He foreknew if He predestinated; but to have predestinated is to have foreknown that which He should do (On the Predestination of the Saints (Book II).
The key point of St. Augustine’s view (later picked up by Luther and Calvin) is that but to have predestinated is to have foreknown that which 'He should do'. In other words it includes 'what we will do', but principally includes what 'God would do'. Foreknowledge can’t exclude man’s choices or God's purposes, or anything else in time! However, as everything is done 'according to God’s purposes' (at least is defining un-moveable boundaries) God's choice is the overall guide and determination governing the whole, otherwise he is no God at all.
The idea of God’s relation to time is what forms the basis of St. Augustine’s views of predestination:
Chapter 21.— Of God's Eternal and Unchangeable Knowledge and Will, Whereby All He Has Made Pleased Him in the Eternal Design as Well as in the Actual Result.
Neither is there any growth from thought to thought in the conceptions of Him in whose spiritual vision all things which He knows are at once embraced. For as without any movement that time can measure, He Himself moves all temporal things, so He knows all times with a knowledge that time cannot measure. And therefore He saw that what He had made was good, when He saw that it was good to make it. And when He saw it made, He had not on that account a twofold nor any way increased knowledge of it; as if He had less knowledge before He made what He saw. For certainly He would not be the perfect worker He is, unless His knowledge were so perfect as to receive no addition from His finished works. (City of God, Chapter 21.— Of God's Eternal and Unchangeable Knowledge and Will, Whereby All He Has Made Pleased Him in the Eternal Design as Well as in the Actual Result.)
Having this principle view of a God outside time, God can’t learn or change in any way. It means he decided everything before time was created. This includes the idea of creating time itself based on the fact that the creature is 'subject to change'. Time is just a duration of one thing to the next which has no meaning if everything was unchangeable like God. God alone is outside of time being unchangeable. Now the obvious tension this produces is how predestination of those ‘elect’ to damnation and those ‘elect’ to salvation is to be understood in terms of God’s love and justice.
St. Augustine himself struggled with this and after modifying his ideas later in life eventually concluded the same ideas as Calvin. However, this is only possible by simply saying it can’t be understood in its real analysis but is hidden in God.
That owing to one man all pass into condemnation who are born of Adam unless they are born again in Christ, even as He has appointed them to be regenerated, before they die in the body, whom He predestinated to everlasting life, as the most merciful bestower of grace; while to those whom He has predestinated to eternal death, He is also the most righteous awarder of punishment not only on account of the sins which they add in the indulgence of their own will, but also because of their original sin, even if, as in the case of infants, they add nothing thereto. Now this is my definite view on that question, so that the hidden things of God may keep their secret, without impairing my own faith. (On the Soul and its Origin (Book IV) )
Note the phrase the hidden things of God. The idea here is that to try to understand God foreknowing and electing 'some to grace' and 'some to damnation' is not to be understood by man. If we try it will seem that God is mean and not just at all. No, those who ponder the subject for a great length of time commonly give up and just have faith knowing he is love and just. The eternity of God and his foreknowledge as well as his determination of what happens in time under the boundaries of providence are believed as a hidden mystery, without impairing my own faith. This subject has always caused perplexity for the church from its earliest days and the positions that one takes of the subject (in agreement with St. Augustine or not) was already defined by the time of Augustine. Naturally, not everybody views this mystery the same way, otherwise it would not be hidden.