ArrobeFr/jquery-calendar-bs4

Problems with random

NoS1gnalWeb opened this issue · 1 comments

Hi,
i have a problem with random in colors, with this code

      moment.locale('fr');
      var now = moment();

      var events = [
        {
          start: now.startOf('week').add(9, 'h').format('X'),
          end: now.startOf('week').add(10, 'h').format('X'),
          title: '1',
          content: 'Hello World! <br> <p>Foo Bar</p>',
          category:'Vigie'
        },
        {
          start: now.startOf('week').add(10, 'h').format('X'),
          end: now.startOf('week').add(11, 'h').format('X'),
          title: '2',
          content: 'Hello World! <br> <p>Foo Bar</p>',
          category:'Vigie'
        },
        {
          start: now.startOf('week').add(11, 'h').format('X'),
          end: now.startOf('week').add(12, 'h').format('X'),
          title: '3',
          content: 'Hello World! <br> <p>Foo Bar</p>',
          category:'Patrouille'
        },
        {
          start: now.startOf('week').add(1, 'days').add(9, 'h').format('X'),
          end: now.startOf('week').add(1, 'days').add(10, 'h').format('X'),
          title: '4',
          content: 'Hello World! <br> <p>Foo Bar</p>',
          category:'Patrouille'
        },
      ];

        var calendar = $('#calendar').Calendar({
            locale: 'en',
            weekday: {
            timeline: {
                intervalMinutes: 30,
                fromHour: 9
            }
            },
            events: events,
            colors: {
                events: ["#26C6DA", "#FF7512"],
                random: false
            },

        }).init();
    }); 

The random is not disabled.. i don't know what's wrong

update :
It's working with this configuration
` var calendar = $('#calendar').Calendar({
locale: 'en',
weekday: {
timeline: {
intervalMinutes: 30,
fromHour: 9
}
},
events: events,
colors: {
events: ["#26C6DA", "#FF7512"],
random: false
},

    });
   calendar.init();

});`