Implements Selecting date via datepicker.