"And it came to pass, as he drew near the camp" (Exodus 32:19). On the seventeenth of Tammuz the tablets were shattered, as it was taught: On the sixth of the month the Ten Commandments were given to Israel. Rabbi Yose says: on the seventh of it. According to the one who says they were given on the sixth, on the seventh he ascended, and it is written, "And Moses was on the mountain forty days..." (Exodus 24:18).
The Tablets Were Shattered on the Seventeenth of Tammuz
Yalkut Shimoni on Torah 392:11
וַיְהִי כַּאֲשֶׁר קָרַב אֶל הַמַּחֲנֶה. בְּשִׁבְעָה עָשָׂר בְּתַמּוּז נִשְׁתַּבְּרוּ הַלּוּחוֹת, דְּתַנְיָא, בְּשִׁשָּׁה בַחֹדֶשׁ נִתְּנוּ דִבָּרוֹת לְיִשְׂרָאֵל. רַבִּי יוֹסֵי אוֹמֵר. בְּשִׁבְעָה בּוֹ. מַאן דַּאֲמַר בְּשִׁשָּׁה נִתְּנוּ, בְּשִׁבְעָה עָלָה, וּכְתִיב "וַיְהִי מֹשֶׁה בָּהָר" וְגוֹ'.