Search code examples
javascriptjsonschedulerfuelux

fuelUx scheduler loose the information of day when we select weekly recurrence


In fuelUX scheduler, after i call the method $('#myscheduler').scheduler("value","JSON VALUE") and if we select weekly recurrence pattern the the information of day is lost for example my input for recurrence pattern is : FREQ=WEEKLY;BYDAY=WE;INTERVAL=2; I will get FREQ=WEEKLY;BYDAY=;INTERVAL=2;. Is something wrong I am doing here? I have attached a LINK


Solution

  • I know I'm late to the party but have you seen your issue has been assigned to the 3.7 milestone of the FuelUX pipeline?

    I have the same problem and modified the fuelux scheduler.js until the fix arrives as per the following:

    At around line #282 you'll see:

    else if(repeat === 'weekly') {
        days = [];
        this.$element.find('.repeat-days-of-the-week .btn-group input:checked').each(function ()
        {
            days.push($(this).data().value);
        });
    

    I changed this to the following. It works for me thus far:

    else if(repeat === 'weekly') {
        days = [];
        this.$element.find('.repeat-days-of-the-week .btn-group input').each(function ()
        {
            if ($(this.parentElement).hasClass("active"))
            {
                days.push($(this).data().value);
            }
        });
    

    NOTE: The selector 'input:checked' has been changed to just select all 'input' and then we check for the parent element 'active' status. This works for an unchanged from initial loading and a modified schedule.

    I hope that helps you or anybody else finding this.

    Cheers