{"id":8001,"date":"2015-11-17T22:40:29","date_gmt":"2015-11-17T22:40:29","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/11\/17\/in-the-fullcalendar-dayclick-event-can-i-get-the-events-that-already-exist-in-clicked-date-open-source-projects-arshaw-fullcalendar\/"},"modified":"2022-08-30T15:03:04","modified_gmt":"2022-08-30T15:03:04","slug":"in-the-fullcalendar-dayclick-event-can-i-get-the-events-that-already-exist-in-clicked-date-open-source-projects-arshaw-fullcalendar","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/11\/17\/in-the-fullcalendar-dayclick-event-can-i-get-the-events-that-already-exist-in-clicked-date-open-source-projects-arshaw-fullcalendar\/","title":{"rendered":"In the FullCalendar dayClick event, can I get the events that already exist in clicked date?-open source projects arshaw\/fullcalendar"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/GQiu4.jpg?s=128&amp;g=1\" \/> <strong>Alex<\/strong><\/p>\n<p>Exested answers didn&#8217;t work for me so there is working code:<\/p>\n<pre><code>dayClick: function (date, jsEvent, view) {\n    var count = 0;\n\n    date = date.toDate();\n    var startDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);\n    var endDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59);\n\n    $('#calendar').fullCalendar('clientEvents', function (event) {\n            if (event.start.toDate() &gt;= startDate &amp;&amp; event.start.toDate() = startDate &amp;&amp; event.end.toDate()<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Alex Exested answers didn&#8217;t work for me so there is working code: dayClick: function (date, jsEvent, view) { var count = 0; date = date.toDate(); var startDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); var endDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59); $(&#8216;#calendar&#8217;).fullCalendar(&#8216;clientEvents&#8217;, function (event) { if (event.start.toDate() &gt;= startDate &amp;&amp; event.start.toDate() [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8001","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=8001"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8001\/revisions"}],"predecessor-version":[{"id":8709,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8001\/revisions\/8709"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=8001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=8001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=8001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}