am i allowed to eat it
Praise be to Allah.
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
And Allah knows best.