customd / jquery-calendar

A full day, week, and resource calendar for use with jQuery.
MIT License
62 stars 26 forks source link

Day time click event #9

Closed LyonelZ closed 11 years ago

LyonelZ commented 11 years ago

Is there a way to get an event when clicking on a date and time where the event returns the date and time clicked on?

samatcd commented 11 years ago

Hi @LyonelZ. If you only want the start time of the block you're clicking on, you could use this:

$('#calendar').on('click','.ui-cal-time',function(e){ console.log( $(this).attr('time') ) });

If you wanted a more accurate time, this would require a bit of math. This is perhaps a method the plugin should provide. Let me know which of these two options works for you.

LyonelZ commented 11 years ago

Hi Sam This seems to be working great thanks