Coder Social home page Coder Social logo

Comments (3)

almgwary avatar almgwary commented on July 28, 2024

@nekken
i frigged it out i will fork and fix it
just i will handle on options change from docs https://fullcalendar.io/docs/utilities/dynamic_options/
some of them need specific function call

from ng2-fullcalendar.

alan345 avatar alan345 commented on July 28, 2024

hey @almgwary , I got the same question, how can we change option object dynamically?
Your link is not in angular2..
thanks for you help

from ng2-fullcalendar.

almgwary avatar almgwary commented on July 28, 2024

hey @alan345 sorry for late . i made it work by the following code

import :

import {Options} from "fullcalendar";
import * as $ from 'jquery';

add change function :

change(changes: any) {
  
      $('angular2-fullcalendar').fullCalendar('changeView',changes.options.currentValue.defaultView);
      let locale = $('angular2-fullcalendar').fullCalendar('option', 'locale');

  }

 /**
   *
   * @param event
   * @param isStick: needed because event object not have stick value, we need to set it natively
   *
   * renderEvent 1.3
   * Renders a new event on the calendar.
   * .fullCalendar( 'renderEvent', event [, stick ] )
   * event must be an Event Object with a title and start at the very least.
   * Normally, the event will disappear once the calendar refetches its event sources (example: when prev/next is clicked). However, specifying stick as true will cause the event to be permanently fixed to the calendar.
   */

  renderEvent(event:any,isStick:boolean){
    if(isStick == true){
      event.stick = true ;
    }
    // console.log('FullCalendar renderEvent',{event});
    $('angular2-fullcalendar').fullCalendar('renderEvent',event);
  }

from ng2-fullcalendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.