When trying to use a function which adds a element to a table and shows the table in a section of the site it does nothing. It should get the date from the currently selecte