breaking out of the date loop for the front events widget
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 8 Feb 2018 14:13:25 +0000 (09:13 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 8 Feb 2018 14:13:25 +0000 (09:13 -0500)
limiting date group to 3 dates

glm-member-db-events/views/front/events/sidebarEvents.html

index 9f2d3de..42a61ff 100644 (file)
@@ -24,12 +24,15 @@ jQuery(document).ready(function($) {
                 $('.date-overlay').hide();
             },
             success: function(data){
-                console.log(data);
+         
                   if( !$.isEmptyObject(data.array_dates) ){
                     var num = 0;
                     var count = 0;
                     $.each(data.array_dates, function(index, value){
-                       
+                        if(count > 3){
+                            return false;
+                        }
+                       console.log("date");
                         var date = new Date(index * 1000);
                         date.setDate(date.getDate());