I heard that if you take drugs 30 days prior to Ramadan, your Salah is not accepted and neither are your fasts. Obviously taking drugs is wrong anyway, but is their evidence for or suggesting that if one was to take drugs and Ramadan was starting say 20 days after they have taken the drugs, would their fasts and Salah not be accepted? And are there specific teachings for certain drugs or are all drugs generalised as one?
Al-hadith salah (not fasts) is not accepted for 40 days due to alcohol (if one doesn't repent), not drugs.
Anyway, taking drugs is haram at any time.
Whether salah and fasts are accepted or not is Allah's work, but the salah or other worships you must do. If some form of worship is not accepted, that does not mean we just leave it because if we quit it we will drop out, out of guilt. Is al-kofr (I mean leave a-salah).
More Information About That: "If someone takes drugs or alcohol they shouldn't pray for forty days, is this true?" Learn Islam - Q&A, YouTube
okay let me sort out everything. Islam is a straight path that teach us good and bad deeds. In a hadith someone was asking to Prophet Muhammad (pbuh) that, one person steal at night as well as pray in time to time. Prophet replied one day his prayer would stop him to steal.
So from my opinion we will have to keep in our mind that whatever bad deeds is my habit, today or another day I'll must have to leave it. But we must keep engage ourselves with prayer. Allah watching us right! So we have to repentance with our bad deeds. And Allah will see our attempts that we had taken to stay away from sins at the day of judgement.