I learned that it is permitted to shave for Yom Haatzmaut and that one should try to shave as close to Yom Haatzmaut as possible. How can this be if it is still the days of the Omer? Shouldn’t shaving only be allowed on Yom Haatzmaut itself like the law is for shaving on Lag Ba’Omer?
In the halachic Responsa (Shut Yayin Hatov, Part II:11, also appears in Hilchot Yom Ha'atzma'ut ,pgs. 334-340, edited by Rav Nachum Rakover ) of Rav Yitzchak Nissim zt"l, Rav Nissim permitted shaving based on a few reasons: 1. Not cutting one's hair during the Sefira nor other forms of mourning are mentioned in the Gemara, though the death of the disciples of R' Akiva is mentioned. Though not to be taken lightly, not to cut one's hair during the Sefira is a minhag. (See Radbaz vol. II: 687). Therefore, when there is place for a celebration of thanksgiving to Hashem for restoring Jewish independence in Eretz Yisrae,l the festivity of the day cancels the custom of mourning. 2. Rav Chaim Palagi zt"l in Mo'ed Lchol Chai, (siman 6) mentioned that in his city there were people who had a personal miracle on the 8th of Iyyar and some on the 11th and they established these days as their "purim" and they permitted haircuts on these days. Other Rabbis stated that permitting shaving on Yom Ha'atzma'ut since Yom Ha'atzma'ut would surely be no less important than a sandak who is allowed to take a haircut in honor of a Brit milah. Haircuts on Yom Ha'atzma'ut were allowed by Rav Tzvi Pessach Frank zt"l, the former Rav of Jerusalem zt"l, and former Rav Chief Rabbi of Israel, Rav Unterman zt"l and others. Rav Tzvi Yehuda Kook zt"l , would rebuke students if he saw them unshaven on Yom Haatzmaut. To accept this day of thanks to Hashem one should be shaven upon the entrance of the day, unlike Lag B'omer when the minhag of mourning only ends when the death of R' Akiva's disciples ended. May we be zocheh to Ge'ulah Shleima.