The bombings happened on different days. The Japanese had several days to surrender, which they didn't.
From wikipedia:
Together with the United Kingdom and the Republic of China, the United States called for a surrender of Japan in the Potsdam Declaration on 26 July 1945, threatening Japan with "prompt and utter destruction". The Japanese government ignored this ultimatum, and two nuclear weapons developed by the Manhattan Project were deployed. Little Boy was dropped on the city of Hiroshima on 6 August 1945, followed by the Fat Man over Nagasaki on 9 August
The Japanese government still did not react to the Potsdam Declaration. Emperor Hirohito, the government, and the war council were considering four conditions for surrender --snip--
The Soviet Foreign Minister Vyacheslav Molotov had informed Tokyo of the Soviet Union's unilateral abrogation of the Soviet–Japanese Neutrality Pact on 5 April. The senior leadership of the Japanese Army began preparations to impose martial law on the nation, with the support of Minister of War Korechika Anami, in order to stop anyone attempting to make peace . --snip--
This doesn't read like they were ready to surrender.