There is nothing wrong with buying this candy at a time other than the celebration, because that is not regarded as participating in the celebration or helping with it.
For more information see the answer to question no. 90026
Islam advises us to treat neighbours kindly, even if they are not Muslim.
Al-Qurtubi (may Allah have mercy on him) said:
I say: based on that, kind treatment of neighbours is enjoined and is recommended, whether they are Muslim or not. And this is the right thing to do. Kind treatment may be in the sense of helping or it may be in the (more)direction:ltr;unicode-bidi:embed">Concerning that Allah, may He be exalted, says (interpretation of the meaning):
“Allah does not forbid you to deal justly and kindly with those who fought not against you on account of religion and did not drive you out of your homes. Verily, Allah loves those who deal with equity”
I am a young man living in Kuwait, but I have taken my daughter to America for medical treatment and I fasted Ramadaan in America. Do I have to pay zakaat al-fitr in America or can I delegate my family in Kuwait to pay it on my behalf? What is the ruling on paying zakaat al-fitr in cash? Please note that in America they pay it in cash instead of giving staple food.
Praise be to Allaah.
The scholars (may Allaah be pleased with them) stated that zakaat al-fitr is connected to numbers of people, not money, and it is to be paid in the place where a person is on the night before Eid.
Ibn Qudaamah said in al-Mughni (4/134):
As for zakaat al-fitr, it is to be paid in the land where the person from whom it is due is present, whether his wealth is there or not. End quote.
As for paying zakaat al-fitr in cash, we have explained in the answer to question no. 22888 that it must be given in the form of food, and that paying it in cash is not acceptable.
So you must try to give it in the form of food. If the poor person refuses the food and asks for cash, then there is nothing wrong with your giving it as cash in that case, because of need or necessity.
And Allaah knows best.
Reproduced from Islam QA