changed date field to date picker, fixed try catch block.