How to create a field in the FullClick EventClick coordinates

0

Howtocreateaneditablefieldineventclickcoordinates

[JS]

$('#calendariousuariodia').fullCalendar({header:{right:'month,agendaDay'},defaultView:'agendaDay',allDay:true,selectable:true,nowIndicator:true,events:{url:'estrutura/agendauser.php',error:function(){console.log('Nãoexistemeventosparaexibir!');}},eventRender:function(eventObj,$el){$el.popover({title:eventObj.title,content:eventObj.description,trigger:'hover',placement:'top',container:'body'});},select:function(start,end,allDay){varcbmdoutor=document.getElementById('cbmdoutor').valueif(cbmdoutor==""){
                toastr["error"]('Favor selecionar um Cirurgião');
                $("#cbmdoutor").focus();
                exit;   
            } else {

                $('#txttitulo').show();
                $('#txtdesc').show();
                $("#txttitulo").focus();

                $("#dtstart").val(moment(start).format('DD/MM/YYYY'));
                $("#dtend").val(moment(end).format('DD/MM/YYYY'));
                $("#hrstart").val(moment(start).format('HH:mm'));
                $("#hrend").val(moment(end).format('HH:mm'));
            }

        },
        eventClick: function(calEvent, jsEvent, view) {

            alert('Event: ' + calEvent.title);
            alert('data: ' + calEvent.id);
            alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
            alert('View: ' + view.name);

            // Ja tenho as coordenadas
            $(this).css('border-color', 'red');

          }


    });
    
asked by anonymous 04.05.2018 / 03:24

0 answers