Fullcalendar
13/12/2017
0
exemplo se marco dia 13 ele marca o dia 14 e assim em diante
segue o código que eu fiz
http://calendario.portalrecco.com.br/
onde eu errei ?
Diego Leme
Posts
13/12/2017
Diego Leme
<!-- jQuery Version 1.11.1 --> <script src="js/jquery.js"></script> <!-- Bootstrap Core JavaScript --> <script src="js/bootstrap.min.js"></script> <!-- FullCalendar --> <script src=''js/moment.min.js''></script> <script src=''js/fullcalendar.min.js''></script> <script> $(document).ready(function() { $(''#calendar'').fullCalendar({ header: { left: ''prev,next today'', center: ''title'', right: ''month,basicWeek,basicDay'' }, defaultDate: ''2017-12-13'', editable: true, eventLimit: true, // allow "more" link when too many events selectable: true, selectHelper: true, select: function(start, end) { $(''#ModalAdd #start'').val(moment(start).format(''YYYY-MM-DD HH:mm:ss'')); $(''#ModalAdd #end'').val(moment(end).format(''YYYY-MM-DD HH:mm:ss'')); $(''#ModalAdd'').modal(''show''); }, eventRender: function(event, element) { element.bind(''dblclick'', function() { $(''#ModalEdit #id'').val(event.id); $(''#ModalEdit #title'').val(event.title); $(''#ModalEdit #color'').val(event.color); $(''#ModalEdit'').modal(''show''); }); }, eventDrop: function(event, delta, revertFunc) { // si changement de position edit(event); }, eventResize: function(event,dayDelta,minuteDelta,revertFunc) { // si changement de longueur edit(event); }, events: [ <?php foreach($events as $event): $start = explode(" ", $event[''start'']); $end = explode(" ", $event[''end'']); if($start[1] == ''00:00:00''){ $start = $start[0]; }else{ $start = $event[''start'']; } if($end[1] == ''00:00:00''){ $end = $end[0]; }else{ $end = $event[''end'']; } ?> { id: ''<?php echo $event[''id'']; ?>'', title: ''<?php echo $event[''title'']; ?>'', start: ''<?php echo $start; ?>'', end: ''<?php echo $end; ?>'', color: ''<?php echo $event[''color'']; ?>'', }, <?php endforeach; ?> ] }); function edit(event){ start = event.start.format(''YYYY-MM-DD HH:mm:ss''); if(event.end){ end = event.end.format(''YYYY-MM-DD HH:mm:ss''); }else{ end = start; } id = event.id; Event = []; Event[0] = id; Event[1] = start; Event[2] = end; $.ajax({ url: ''editEventDate.php'', type: "POST", data: {Event:Event}, success: function(rep) { if(rep == ''OK''){ alert(''Salvo''); }else{ alert(''Nao foi possovel Salvar. tente novamente!''); } } }); } }); </script> </body> </html>
14/12/2017
Rander Freitas
Só com esse pedaço de código fica difícil analisar o motivo do erro. Solicito que você pegue a copie a pasta do projeto, compacte-a num zip e armazene em algum drive na nuvem como google drive, onedrive e outros e passe o link para download para podermos analisar melhor o projeto.
Valeu!
22/03/2018
Thiago
Clique aqui para fazer login e interagir na Comunidade :)