Adam Shaw 7 лет назад
Родитель
Сommit
e6935efa21
2 измененных файлов с 5 добавлено и 7 удалено
  1. 1 1
      demos/locales.html
  2. 4 6
      demos/time-zones.html

+ 1 - 1
demos/locales.html

@@ -92,7 +92,7 @@
       optionEl.selected = localeCode == initialLocaleCode;
       optionEl.innerText = localeCode;
       localeSelectorEl.appendChild(optionEl);
-    })
+    });
 
     // when the selected option changes, dynamically change the calendar option
     localeSelectorEl.addEventListener('change', function() {

+ 4 - 6
demos/time-zones.html

@@ -10,6 +10,7 @@
   document.addEventListener('DOMContentLoaded', function() {
     var initialTimeZone = 'local';
     var timeZoneSelectorEl = document.getElementById('time-zone-selector');
+    var loadingEl = document.getElementById('loading');
     var calendarEl = document.getElementById('calendar');
 
     var calendar = new FullCalendar.Calendar(calendarEl, {
@@ -32,16 +33,13 @@
       },
       loading: function(bool) {
         if (bool) {
-          document.getElementById('loading').style.display = 'inline'; // show
+          loadingEl.style.display = 'inline'; // show
         } else {
-          document.getElementById('loading').style.display = 'none'; // hide
+          loadingEl.style.display = 'none'; // hide
         }
       },
 
       eventTimeFormat: { hour: 'numeric', minute: '2-digit', timeZoneName: 'short' },
-      // TODO: once event API is better:
-      // eventRender: function(event, el) {
-      // },
 
       dateClick: function(arg) {
         console.log('dateClick', calendar.formatIso(arg.date));
@@ -60,7 +58,7 @@
       timeZones.forEach(function(timeZone) {
         var optionEl;
 
-        if (timeZone != 'UTC') { // UTC is already in the list
+        if (timeZone !== 'UTC') { // UTC is already in the list
           optionEl = document.createElement('option');
           optionEl.value = timeZone;
           optionEl.innerText = timeZone;