Fixed bugs to dynamic date selection buttons