Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. $.ajax(
  2. {
  3. url: 'endpoint',
  4. method: 'GET',
  5. data: {
  6. action: 'getAgenda',
  7. keyuser: idLess
  8. },
  9. success: function(response){
  10. var dados_agenda = response;
  11. },
  12. dataType: 'json'
  13. }
  14.  
  15. );
  16.  
  17. {
  18. "id": "1",
  19. "title": "reuniãp",
  20. "start": "2019-03-19 10:00:00",
  21. "end": "2019-03-19 11:00:00",
  22. "situacao": "A",
  23. "cor": "#4761c5",
  24. "Update": "2019-03-17 16:24:00"
  25. }{
  26. "id": "2",
  27. "title": "Churrasqueira",
  28. "start": "2019-03-20 10:00:00",
  29. "end": "2019-03-20 11:00:00",
  30. "situacao": "A",
  31. "cor": "#4761c5",
  32. "Update": "2019-03-17 18:17:00"
  33. }
  34.  
  35. $(document).ready(function() {
  36.  
  37. $('#calendar').fullCalendar({
  38. header: {
  39. left: 'prev,next today',
  40. center: 'title',
  41. right: 'month,basicWeek,basicDay'
  42. },
  43. defaultDate: '2019-03-12',
  44. navLinks: true,
  45. editable: true,
  46. eventLimit: true,
  47. events:[
  48. {
  49. id: 999, <- id entrar aqui
  50. title: 'All Day Event', <- title entrar aqui
  51. start: '2019-01-01', <- start entrar aqui
  52. end: '2019-03-07' <- end entrar aqui
  53. },
  54. {
  55. id: 999, <- id entrar aqui
  56. title: 'Long Event', <- title entrar aqui
  57. start: '2019-03-07', <- start entrar aqui
  58. end: '2019-03-07' <- end entrar aqui
  59. }
  60. ]
  61.  
  62. });
  63. });
  64.  
  65. $('#calendar').fullCalendar('addEventSource', dados_agenda );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement