-
-
Save damonmcminn/8940340 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| var currentMonth = moment().format('YYYY-MM'); | |
| var nextMonth = moment().add('month', 1).format('YYYY-MM'); | |
| var events = [{"date": "2014-02-27", "url": "http://dev.mccarthyscott.com/be/booking-search?field_booking_date_value%5Bvalue%5D%5Bdate%5D=2014-02-10&field_timeslot_category_tid%5B%5D=9#sidr"}, {"date": "2014-02-25", "url": "http://dev.mccarthyscott.com/be/booking-search?field_booking_date_value%5Bvalue%5D%5Bdate%5D=2014-02-10&field_timeslot_category_tid%5B%5D=9#sidr"}]; | |
| $('#full-clndr').clndr({ | |
| template: $('#full-clndr-template').html(), | |
| events: events, | |
| daysOfTheWeek: ['M', 'T', 'W', 'T', 'F', 'S', 'S'], | |
| clickEvents: { | |
| click: function(target) { | |
| window.location.href = target.events[0].url; | |
| } | |
| } | |
| }); | |
| </script> | |
| <div id="full-clndr" class="clearfix"> | |
| <script type="text/template" id="full-clndr-template"> | |
| <div class="clndr-grid"> | |
| <div class="controls"> | |
| <div class="clndr-previous-button"><i class="ion ion-chevron-left"></i></div><div class="month"><%= month %> <%= year %></div><div class="clndr-next-button"><i class="ion ion-chevron-right"></i></div> | |
| </div> | |
| <div class="days-of-the-week clearfix"> | |
| <% _.each(daysOfTheWeek, function(day) { %> | |
| <div class="header-day"><%= day %></div> | |
| <% }); %> | |
| </div> | |
| <div class="days clearfix"> | |
| <% _.each(days, function(day) { %> | |
| <div class="<%= day.classes %>" id="<%= day.id %>"><span class="day-number"><%= day.day %></span></div> | |
| <% }); %> | |
| </div> | |
| </div> | |
| </script> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment