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

80
Visualizações
variable from Bootbox input

I'm using bootbox for the first time. I'm using fullcalendar.io and instead of using basic alerts I have to use bootbox.

When I click on a day of the calendar a bootbox alert pops up and inside of it I have to receive in input the title of the event to add on the calendar, and the type of the event (meeting or ...).

The problem is that I don't know how to create inputs in a bootbox alert and, even if I did, I don't know how to then use this 2 inputs result as a variable to add them into the calendar.

const events = [];

document.addEventListener('DOMContentLoaded', function () {
  var calendarEl = document.getElementById('calendar');
  var calendar = new FullCalendar.Calendar(calendarEl, {
    selectable: true,
    initialView: 'dayGridMonth',
    headerToolbar: {
      left: 'prev,next today',
      center: 'title',
      right: 'dayGridMonth,timeGridWeek,timeGridDay'
    },
    dateClick: function (dateClickInfo) {
      createEvent(dateClickInfo.dateStr, 'Some event', undefined);
      bootbox.prompt("Inesrt the name of the event", function (title) {
      }
    },
  });

  calendar.render();
}),

function createEvent(title) {
  const event = {
    title: "",
    type: ""
  }
  events.push(event);
};

This is my super-basic code. I don't even know how to add the second input for the type of the event to the same bootbox. (I think I need to use the same bootbox because it calls the function who needs to have both the variables).

about 4 years ago · Juan Pablo Isaza
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