Added availability date logic to controller and view.