title: How to get the value of current selected date from calendar eonasdan
body: <p>I am using <a href="http://eonasdan.github.io/bootstrap-datetimepicker/" rel="nofollow noreferrer">http://eonasdan.github.io/bootstrap-datetimepicker/</a> for calendar. Now I want to pick the selected date by the user. I am stuck with this calendar. Please help me to get the current selected date by the user I have used js to get the value.</p>
  <p>On each date there is a class named &quot;day&quot;. Now I wanted to get the value of the attribute &quot;data-day&quot; which have the value of the date as follows:</p>
  <pre><code>$(&quot;.day&quot;).click(function(){
              var clicked = $(this).attr('id');
           alert(clicked);
           });
  </code></pre>
  <p>It returns the attribute's value only one time it's not recognizing the second click.</p>
  <p>Please help me with js or this eonasdan plugin.</p>