Date function javascript

Fixed bugs and update css for responsiveness