Bug fix on date picker