I need an onclick event, when the user clicks on the first li aka(Any Date).How do I select that element using jQuery?
You can use jquery :first selector to target the 1st element in a collection of elements.
$('ul li:first').click(function()
{
// do something
});
Example : https://jsfiddle.net/3mb8ep19/
or jquery first() filter :
$('ul li').first().click(function()
{
// do something
});
Example : https://jsfiddle.net/3mb8ep19/1/