Adds a reference to the Datepicker instance in the element.