Fixed date parsing problems. Changed it to use native datepicker