Fix click, add timestamp, do date formatting in js