It is illegal to discriminate against an employee on the basis of a disability. Whatever prompted the need for your back surgery likely (but not necessarily) constituted a disability under California law. Moreover, employers are required to provide for a reasonable accommodation for a disability, and time off for surgery is one option that the employer is required to consider. The employer is not always required to give time off, but it must consider whether that is a reasonable accommodation under the circumstances.
Furthermore, if your employer had 50 or more employees, you likely qualified for up to 12 weeks of unpaid time off to attend to your serious medical condition, under California's Family Rights Act (CFRA) and the federal equivalent, the Family & Medical Leave Act (FMLA). You can't be fired for attempting to exercise your CFRA/FMLA rights.
It is particularly disturbing that this happened to you after 17 years at the same employer. It will be hard for the employer to argue that, after 17 years, it needed to get rid of you coincidentally right before you needed to have surgery.
If you feel that you have been discriminated against on the basis of disability or need for CFRA/FMLA leave, consider whether legal action is the right approach for you. You would have to take any such legal action within the statute of limitations, or your right to do so could be lost forever.
I hope this information is helpful to you.
Craig T. Byrnes
Disclaimer: Please be aware that I am not offering legal advice, nor forming an attorney-client relationship with you. I am not representing you, nor doing anything to protect your legal rights. If you believe that you have suffered a legal wrong, take action before any statute or limitations expires, or your right to do so may be lost forever. Good luck in your legal matter.
You need to see an attorney in your area soon, before you have your back surgery. It certainly sounds like you have a case, but the attorney will have to ascertain the rest of the facts. Most employment attorneys offer free telephone consultations for employees. You can find an attorney here on Avvo or at the website for the California Employment Lawyers Association, www.cela.org.
You also need to consult a workers' compensation attorney.
If you do these things while you still have the strength before your surgery, your attorney or attorneys can be acting on your behalf and filing what needs to be filed while you are recuperating. I believe you will feel better to have acted and not worrying as much about this and making decisions while you are unable to get around easily.
Best of luck.