dynamic date selector, fixed more bugs