According to Rachel Maddow, he can drop out by 5 PM on August 20th - the eleventh Tuesday before the election...
...but if he gets a court order, he can do it by the SIXTH Tuesday before the election, which is the 25th of September.
I'm just saying that he might have a reason to wait that long so he can have the time to prepare.