Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

204
Visualizações
Kendo Scheduler for Angular - on button click show create event form

I'm implementing kendo scheduler for Angular in our app. My problem is that, I want to have on the toolbar button which allows user to add new event, normally by default user needs to click twice on calendar cell and then the form shows. How to achieve it? I was trying to add new event by dispatching keydown event when clicking on "add" button, but it doesn't work (normally when I have focus in kendo-scheduler and press "c" on keyboard form appears. My second idea was to call on component "addEvent" which is event emitter in kendo library, but it only catches not actual form values, but values assigned during creation of event. Any ideas?

My code to add new event:

addNewEvent(component: SchedulerComponent) {
    const scheduler = document.getElementsByTagName('kendo-scheduler')[0];

    scheduler.dispatchEvent(
        new KeyboardEvent(
            'keydown', {key: 'c'} //first solution
        )
    );

    component.addEvent({//second solution
        start: new Date(), //when saving only start and end fields are filled, but only with those values, not with those selected on form
        end: new Date(),
    });
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

the answer was the upgraded second solution, it's necessary to create and assign new formGroup:

this.form = this.formBuilder.group({
    taskId: 0,
    title: '',
    description: '',
    start: new Date(),
    end: new Date(),
    startTimezone: null,
    endTimezone: null,
    isAllDay: false,
    recurrenceRule: null,
    recurrenceException: null
});

component.addEvent(this.form);
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda