I am using FullCalendar.io to create a calendar, I found on the net a code implementing the SQL database that inserts data in the database from prompt. I would like to use modal instead but it doesn't work properly.
<script>
$(document).ready(function() {
var calendar = $('#calendar').fullCalendar({
editable: true,
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
events: 'load.php',
selectable: true,
selectHelper: true,
select: function(start, end, allDay) {
var title = prompt("Enter Event Title");
if (title) {
var start = $.fullCalendar.formatDate(start, "Y-MM-DD HH:mm:ss");
var end = $.fullCalendar.formatDate(end, "Y-MM-DD HH:mm:ss");
$.ajax({ **...**
I create a simple modal using bootstrap and I've included bootstrap and jquery. In a simple project, I simply used the command $('#modalID').modal('show')
In a really similar code using FullCalendar.io too, they implement the modal simply with that line of code. the only big difference is how the calendar library is loaded. In the other project, the code is really similar except for the document ready function.
I tried with a lot of combinations but none of them is working including using javascript to show some HTML styled as hidden (display: none). I need to open a pop up after the command select:
What solutions do you suggest to me?