 
   window.tableSlotCalendar = $("#calendar").fullCalendar(
     eventClick: (event, element) ->
+      console.log event.end
+      FormHandler.showForm(null, event.start, event.end)
       event.title = "CLICKED!"
       $("#calendar").fullCalendar "updateEvent", event
 

  d = ['Sunday','Monday','Tuesday','Wednesday', 'Thursday','Friday','Saturday']
  d[@getDay()]


$(document).ready ->
  date = new Date()

    selectable: true
    selectHelper: true
    select: (start, end, allDay) ->
      FormHandler.showForm(null, start, end)
      
      $('#template_form form').on 'submit', (e) ->
        e.preventDefault()
