select dates for matrix dynamically