How can I make fullCalendar remember events?

0

I have a board with switch that shows or hides the events in fullcallendar, but when I change the month, they are shown again for more than the switch this desactivado , as I can do so that the change of Month record this?

Switch panel

<span class="switch-tittle"><em class="fas fa-plane"></em></span><el-tooltip :content="'Licencias'"><el-switch @change="seeLicense()" v-model="calendar.seeLicense"></el-switch></el-tooltip>
          <span class="switch-tittle"><em class="fas fa-building"></em></span><el-tooltip :content="'HomeOffice'"><el-switch @change="seeHomeOffice()" v-model="calendar.seeHomeOffice"></el-switch></el-tooltip>
          <span class="switch-tittle"><em class="fas fa-birthday-cake"></em></span><el-tooltip :content="'Cumpleaños'"><el-switch @change="seeBirthday()" v-model="calendar.seeBirthday"></el-switch></el-tooltip>
          <span class="switch-tittle"><em class="fas fa-calendar-alt"></em></span><el-tooltip :content="'Feriados'"><el-switch @change="seeHolidaysName()" v-model="calendar.seeHolidaysName"></el-switch></el-tooltip>
          <span class="switch-tittle"><em class="fas fa-bullhorn"></em></span><el-tooltip :content="'Eventos'"><el-switch @change="seeEventCompany()" v-model="calendar.seeEventCompany"></el-switch></el-tooltip>

Properties

export default {
name: 'content-dinamic',
mounted() {
  var self = this;
  this.getData();
  this.readyCalendar(self);
},
mixins: [mixin],
data() {
  return {
    calendar: {
      seeHomeOffice: true,
      seeLicense: true,
      seeEventCompany: true,
      seeBirthday: true,
      seeHoliday: true,
      seeHolidaysName: true
    },

Methods

methods: {
  seeLicense() {
    (this.calendar.seeLicense) ? $('.licenses').show() : $('.licenses').hide();
  },

  seeHomeOffice() {
    (this.calendar.seeHomeOffice) ? $('.home-office').show() : $('.home-office').hide();
  },

  seeBirthday() {
    (this.calendar.seeBirthday) ? $('.birthday').show() : $('.birthday').hide();
  },

  seeHolidaysName() {
    (this.calendar.seeHolidaysName) ? $('.holidaysName').show() : $('.holidaysName').hide();
  },
  seeEventCompany() {
    (this.calendar.seeEventCompany) ? $('.events').show() : $('.events').hide();
  },
    
asked by Jeypi 16.08.2018 в 18:23
source

2 answers

0

If you need to remember the events you should use a database and use ajax, I personally made one, and I think it's not that difficult.

When you change your month, you must execute an ajax that brings the ones of the month you have selected.

I leave you the documentation so you can expand your knowledge.

link

    
answered by 16.08.2018 в 19:05
0

I understand, when you make a change in the calendar render and then change the month and go back to the previous month (where you made changes) it was like in the beginning. If so, it is because you are not saving those changes with ajax, something that should be automatically saved every change (after validation is clear), since as indicated above every time you change the month a transaction is executed in which the data is requested of the month in specific, but we do not know if you are saving the changes before changing the month

    
answered by 18.10.2018 в 21:37