67017

Fullcalendar.js get events of the day on click

Fullcalendar.js get events of the day on click

Is it possible to get all events of the day I click on in the monthview and print them in any div element with Fullcalendar.js?

Here's my JSFiddle:

http://jsfiddle.net/alexchizhov/syf9ycbc/4/

Answer1:

You can always iterate over all events and find out which event is on selected day. Here is my function to do that:

function getEvents(date){ all_events.forEach(function(entry) { if (entry['start'] == date.format()){ alert(entry['title']);} else if (entry['start'] <= date.format() && entry['end'] >= date.format()){ alert(entry['title']);} }); }

You can see my <strong>DEMO</strong>.

If you click on date 2014-10-06 there will be 2 events that will shows up in alert. Click on date 2014-10-07 will alert only one event.

Recommend

  • How do I deploy my Node.js app with a opencv4nodejs dependency to Heroku?
  • Is it possible to extract table infomation using Apache Tika?
  • Capturing HTML Text Input Key press after key has been applied?
  • Defining variable by logical subseting on time interval in data.table
  • Sticky Footer W/JQuery Mobile
  • formediting modals shows at wrong position
  • Crafting a LINQ based solution to determine if a set of predicates are satisfied for a pair of colle
  • Collapsible Sankey Diagram - D3
  • Tinymce strips attributes on submit
  • how to remove a div with same ids but display='block' and display='none' in JAVa
  • Jquery resizable reposition handle after scroll
  • Is there a way to clone native functions in javascript like window.alert or document.write
  • A class implementing two different IObservables?
  • cell spacing in div table
  • select function not working in 3.5.4 version of d3.js
  • Cut the background to expose the layer below
  • msbuild create itemgroup from property group
  • Updating both a ConcurrentHashMap and an AtomicInteger safely
  • Can someone please explain to me in the most layman terms how to use EventArgs?
  • C: Incompatible pointer type initializing
  • why xml file does not aligned properly after append the string in beginning and end of the file usin
  • how to display data from 1st point on words on y axis for line chart in d3.js
  • Row Count Is Returning the incorrect number using RaptureXML
  • How to clear text inside text field when radio button is select
  • Why ng-show works with ng-repeat but ng-if doesn't? [duplicate]
  • Get object from AWS S3 as a stream
  • Cross-Platform Protobuf Serialization
  • WinForms: two way TextBox problem
  • Validaiting emails with Net.Mail MailAddress
  • Weird JavaScript statement, what does it mean?
  • Do I've to free mysql result after storing it?
  • bootstrap to use multiple ng-app
  • How to get icons for entities from eclipse?
  • Turn off referential integrity in Derby? is it possible?
  • How can I remove ASP.NET Designer.cs files?
  • python draw pie shapes with colour filled
  • JaxB to read class hierarchy
  • Is there any way to bind data to data.frame by some index?
  • Django query for large number of relationships
  • How can i traverse a binary tree from right to left in java?