Well didn't Umar (ra) allow Muslims to leave the family for Jihad feesabeelillah for many months, which later he made a limit of 4 months(or 3 months i m not sure). Similarly I think leaving the family for seeking knowledge might be ok, I suppose. In those days it was common for even traders, merchants etc to leave the family for months, since the modes of transport available was very slow. So I don't think those times can be compared with the present day.