The president initiated the process for the formation of a new government soon after Khanal stepped down amid weeks of intense pressure from the Nepali Congress and UCPN-Maoist for his failure to push forward the peace process.
Yadav directed the political parties to form a consensus government by August 21, President's Office said.
Khanal was asked by the president to serve as the caretaker Prime Minister after accepting his resignation, Yadav's press advisor Rajendra Dahal said.
There will be an election in the parliament for the majority government as per the interim constitution if a national consensus government is not formed within the given deadline.
61-year-old Khanal, who headed a fragile coalition of three parties, blamed the Maoists and the Nepali Congress for the political deadlock, including the failure to make tangible progress on the peace process and drafting of a new constitution.
"Nepali Congress should have supported the government, but they didn't," Khanal told lawmakers in a special address to 601-member Constituent Assembly, which functions as the country's interim Parliament.
"Maoist also could not support the government on peace process (according to) as my expectations," said Khanal, ending his 6-month 9-day long tenure as the 34th Prime Minister.