Updated to set the date through the datepicker instead of just setting
the value