add select date function and add detail page