Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #102237
    Up
    0
    Down

    Hi, I have 2 questions about scheduler
    1. In a repeat event when I move one item of the repeat event out, there is a new context menu button, ‘delete’, what is its function ?
    2. In a repeat event when I edit it, there are 2 options, what’s the event for the edit simple event button?
     
    Thanks

    #102241
    YavorDashev
    Member
    Up
    0
    Down

    Hi Javi Navarrete,
    I would like to answer your questions in a convenient way:
    1. Repeating event occurances are treated as date occurrences of the event instead of being separate events. Each occurrence has a unique date that the event repeats on. An occurrence can be modified. When modified it is treated as an exception of the repeating Event, that is why in the context menu the ‘Delete’ option is displayed too.
    More info about this you can find in the API docs of the Scheduler component: https://www.htmlelements.com/docs/scheduler-events/
    2. For this I have created a code snippet which will enable you to have this type of functionality:

    window.onload= function () {
        const scheduler = document.getElementById('scheduler');
        scheduler.addEventListener('editDialogOpening', (event) => {
            const eventDetails = event.detail;
            if (eventDetails.type === 'confirm') {
                setTimeout(() => {
                    const dialogButtons= eventDetails.target.querySelectorAll('.smart-scheduler-window-button');
                    for( let i= 0; i < dialogButtons.length; i++ ) {
                        dialogButtons[i].addEventListener('click', () => {
                            console.log('dialog button clicked');
                        })
                    }
                }, 100);
            }
        });
    }

    Let me know if that works for you!
    Please, do not hesitate to contact us if you have any additional questions.
    Best regards,
    Yavor Dashev
    Smart UI Team
    https://www.htmlelements.com/

    #102242
    Up
    0
    Down

    I’ll try it
    Thanks

    #102247
    Up
    0
    Down

    Hi, I’ll change my first question,
    How could I delete a single event from a repeat event
    Example: I have a repeat event from 1st January to 31st December, but I have holidays so I want to delete some days between
    Is this functionality implented? In that case, what’s the event I have to use?
    Thanks

    #102251
    YavorDashev
    Member
    Up
    0
    Down

    Hi Javi Navarrete,
    Yes the Scheduler component support such type of functionality using the hideNonworkingWeekdays and nonworkingDays properties.
    Demo for it: https://www.htmlelements.com/demos/scheduler/hide-view-days/
    Please, do not hesitate to contact us if you have any additional questions.
    Best regards,
    Yavor Dashev
    Smart UI Team
    https://www.htmlelements.com/

    #102256
    Up
    0
    Down

    I’m sorry, but that wasn’t my question, maybe my fault.
    I mean if I can delete a day in a repeat event.
    Example: I have a repeat event from monday to friday, and I want to delete this wednesday but only this one, could I do it?
    Thank you again.
     

    #102276
    YavorDashev
    Member
    Up
    0
    Down

    Hi Javi Navarrete,
    The Scheduler component doesn’t support this type of functionality because the repeat exceptions can only remove the whole repeating event.
    However I will add a work item as a feature request for this functionality.
    Please, do not hesitate to contact us if you have any additional questions.
    Best regards,
    Yavor Dashev
    Smart UI Team
    https://www.htmlelements.com/

    #102294
    YavorDashev
    Member
    Up
    0
    Down

    Hi Javi Navarrete,
    I guess there has been some misunderstanding from my side.
    When you have a repeating event which repeats each day from monday to friday you can remove the repeated event by using the exceptions property of the event.
    Code snippet for this:

    {
            label: 'Design Review',
            dateStart: new Date(currentYear, currentMonth, 1),
            dateEnd: new Date(currentYear, currentMonth, 2),
            allDay: true,
            backgroundColor: '#388E3C',
            repeat: {
                repeatFreq: 'daily',
                repeatInterval: 1,
                repeatEnd: 15,
                exceptions: [
                    {
                        date: new Date(currentYear, currentMonth, 2),
                        label: 'Official Holliday',
                        backgroundColor: '#64DD17',
                        hidden: true
                    },
                    {
                        date: new Date(currentYear, currentMonth, 7),
                        label: 'Day off',
                        hidden: true
                    },
                    {
                        date: new Date(currentYear, currentMonth, 15),
                        label: 'Day off',
                        hidden: true
                    },
                    {
                        date: new Date(currentYear, currentMonth, 9),
                        label: 'Rescheduled. Simon is not available',
                        dateStart: new Date(currentYear, currentMonth, 8),
                        dateEnd: new Date(currentYear, currentMonth, 9),
                        backgroundColor: '#2196F3'
                    }
                ]
            }
        },

    Also demo for repeating events: https://www.htmlelements.com/demos/scheduler/repeating-events/
    Let me know what you think!
    Please, do not hesitate to contact us if you have any additional questions.
    Best regards,
    Yavor Dashev
    Smart UI Team
    https://www.htmlelements.com/

    #102303
    Up
    0
    Down

    Hi
    Yeah, that’s what I mean, but I need an event to know that the user has clicked on the delete button
    Thank you

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.