It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Fast when you see it (the new moon) and break your fast when you see it (that is, celebrate Eid). If clouds or haze come in front of it, then complete the count; and the month is (also) twenty-nine days."
Related hadith on this topic