Add fields in Fullcalendar

Asked

Viewed 197 times

0

Good evening! I’m looking to develop a task manager for an office staff. I saw some videos about Fullcalendar and saw that in the pattern it accepts the following fields: ID, Title, Start, End and Color. I would like to add, in addition to these events, the Fields: Functionname, Client Name and Observations. Is it possible? Another doubt I have is the possibility to insert separately date and time to start and end, would like?

1 answer

0

Yes, it is possible, just add in the Json ebject the desired properties, follow an example:

events: [{
              id: 1,
              title: 'Evento do Leonardo',
              start: dataInicio,
              end: dataFim,
              color: '0c4873',
              nomeFuncionario: 'LEONARDO',
              nomeCliente: 'GUSTAVO', 
              url: 'http://localhost:8080/leonardo'
         }]

And to recur these attributes you must access the 'extendedProps'

let nomeCliente = event.extendsProps.nomeCliente;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.