question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to trigger event change date?

See original GitHub issue

I use lib Fullcalendar in vuejs I use view Render event in config but it belong data function, it’s don’t allow access this or anything (store, function, exp)? How to i can trigger a event in $store object? Or recommend for me solution instead?

configEvent: {
        locale: 'vi',
        defaultView: 'month',
        lazyFetching: true,
        viewRender (view, element) {
          if (view.type === 'month') {
            let titleDateSplit = view.title.split(' ');
            let filterEvent = {
              year: titleDateSplit[2],
              month: (Number(titleDateSplit[1]) < 10) ? ('0' + titleDateSplit[1]) : (titleDateSplit[1])
            };
            getListEvent(filterEvent)
              .then(res => {
                this.$store.dispatch('setListEventFilter', res.data);
              });
          }
        },
        header: {
          right: ' month,agendaWeek,agendaDay',
          center: 'title',
          left: 'prev,next'
        },
        footer: {
          center: 'prev,next'
        }
      },

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
trungk18commented, May 2, 2019

@CuongStf So basically you want to trigger this this.$store.dispatch('setListEventFilter', res.data) inside the viewRender, am I right? Could you please show your Vue component code, include how you initiate the Fullcalendar inside Vue and the $store too.

0reactions
arshawcommented, Jul 25, 2019

I believe this ticket boils down to having this be a reference to the Vue instance.

Could you please open up a ticket on the Vue issue tracker if so?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I trigger an onchange event manually? [duplicate]
I'm setting a date-time textfield value via a calendar widget. Obviously, the calendar widget does something like this : document.getElementById('datetimetext') ...
Read more >
Trigger "change" Events of Input Element · Issue #2401 - GitHub
This can be done by: Change the event type from "change.td" to "change" before triggering the original events (either jQuery event or native...
Read more >
howto trigger events from DatePickerSelect ? - Forums - Liferay
I want to use the DatePickerSelect, but i need to trigger the moment that the user changed the date. I tried several things...
Read more >
How to trigger event based on date change on calendar
Hello! I'm using the calendar to hold events and I'd like to be able to trigger an alert whenever someone drags an event...
Read more >
date change in datepicker does not trigger onchange event
Hi, I want to change the value of another textbox when the user changes the date in a datetime field. So the user...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found