fixed bug in date selector