Hello and welcome to JustAnswer. Please note: This is general information for educational purposes only and is not legal advice. No specific course of action is proposed herein, and no attorney-client relationship or privilege is formed by speaking to an expert on this site. By continuing, you confirm that you understand and agree to these terms.
I am sorry to hear about this situation. This completely depends on the contract. There is no statute that deals with this issue in California as this is a purely contractual matter. As such, common law doctrine of contract law applies.
As I said, it all depends on the contract. If the contract allows them to terminate based on inspection (at any time, even past the deadline), then they can. If there is no clause, then they cannot. If they cannot, the contract controls whether the seller can (a) keep earnest money, (b) force a breach of contract sale and demand specific performance, (c) or have their choice of the two.
But - even if the contract does not specifically allow them to terminate based on inspection and they are past the deadline, they can attempt to claim that you attempted to hide the problem, in essence, fraud. Their claim of fraud can be an "affirmative defense" to your breach of contract claim (or keeping of the earnest money). If this happens, then the Court decides as to what is to happen, on a case by case basis, given the facts.
So someone in your situation now wants to send a letter threatening breach of contract suit and/or keeping the earnest money. Hopefully, this would scare them enough to decide to buy to avoid litigation and/or loss of earnest money. If they do not "blink" and demand the money back, and you disagree, then this may indeed be settled by the Court one way or another.
I hope this helps and clarifies. Please use the SEND or REPLY button to keep chatting, or please RATE when finished. You may always ask follow ups at no charge after rating. Kindly rate my answer as one of TOP THREE FACES/STARS and then SUBMIT, as this is how experts get credit for our time. Rating my answer the bottom two faces/stars (or failing to submit the rating) does not give me credit and reflects poorly on me, even if my answer is correct. I work very hard to formulate an informative and honest answer for you; please reciprocate my good faith with a positive rating.