Sayyiduna Abu Hurairah (may Allah be pleased with him) narrated from the Messenger of Allah (peace and blessings be upon him), he (peace be upon him) said: "Whoever buys such an animal (like a she-camel, cow, or goat, etc.) whose milk has been withheld, then he milks it, he has a choice: if he wishes, he may keep it, and if he wishes, he may return it, and along with it, he should give one sa’ (approximately two and a quarter kilograms) of dates."
Hadith Referenceمسند اسحاق بن راهويه / كتاب البيوع / 433