Fixed error and changed purchase date to date picker