GithubHelp home page GithubHelp logo

Comments (12)

willrax avatar willrax commented on August 15, 2024

Thanks for reporting this. Will look in to it.

from ember-calendar.

igorpreston avatar igorpreston commented on August 15, 2024

@willrax Thanks for quick reply! I am looking forward to fix because I really liked the calendar widget itself and want to incorporate this addon in some big project that is currently in development.

from ember-calendar.

matteodepalo avatar matteodepalo commented on August 15, 2024

@igorpreston Have you tried running ember generate ember-calendar?

from ember-calendar.

igorpreston avatar igorpreston commented on August 15, 2024

@matteodepalo
Created an empty app and did things in following sequence:

  1. ember install ember-calendar
  2. ember generate ember-calendar
  3. Tried running app and it throwed an error that broccoli-sass is required. Ok, installed broccoli-sass.
  4. After rebooting app, the error in console: Error: Could not find module moment imported from ember-moment/helpers/moment
  5. Tried running npm install and bower install but nothing has been installed.
  6. Tried ember install ember-moment. It installed some bower packages.
  7. After rebooting app, the error in the console: TypeError: this.get(...) is undefined (vendor.js (line 108780, col 13))

Can someone please provide detailed instruction how to install it and get it to work without any errors.

from ember-calendar.

matteodepalo avatar matteodepalo commented on August 15, 2024

@eugeniodepalo would you be able to help on this? I remember you were talking about some issues with dependencies not being installed.

from ember-calendar.

e-karma avatar e-karma commented on August 15, 2024

@eugeniodepalo @matteodepalo @willrax Hello Everybody, Great work on the addon!!
Very clean implementation. I am however encountering the same issue...

Any News?

Thanks!!

from ember-calendar.

matteodepalo avatar matteodepalo commented on August 15, 2024

Working on it #17

from ember-calendar.

matteodepalo avatar matteodepalo commented on August 15, 2024

The PR is ready for review. In the meanwhile if you want to help test this you can run:

  • ember new calendar-test
  • cd calendar-test
  • npm install "git+ssh://[email protected]:alphasights/ember-calendar.git#feature/mde/fix-dependencies" --save-dev
  • ember generate ember-calendar

At this point if you include the basic {{as-calendar}} component in application.hbs you should see the calendar without styles. As mentioned in the README if you want the default styles you have to install ember-cli-paint. A PR alphasights/ember-cli-paint#48 is being reviewed on that repo right now and it will bump dependencies too, fixing an issue with the dropdown.

from ember-calendar.

igorpreston avatar igorpreston commented on August 15, 2024

@matteodepalo did exactly as you described and included this component.
The only error I experienced is after running ember serve, it said that there is no app.scss file. I changed app.css to app.scss and worked. However:

{{as-calendar
  title="Ember Calendar"
  occurrences=occurrences
  defaultTimeZoneQuery="New York|London|Dubai|Hong Kong"
  dayStartingTime="9:00"
  dayEndingTime="18:00"
  timeSlotDuration="00:30"
  onAddOccurrence="calendarAddOccurrence"
  onUpdateOccurrence="calendarUpdateOccurrence"
  onRemoveOccurrence="calendarRemoveOccurrence"}}

Then got an error in console:

TypeError: this.get(...) is undefined (vendor.js (line 108660, col 13))

I tried removing all properties on component and did this:

{{as-calendar}}

Got an error:

TypeError: this.get(...) is null (vendor.js (line 108660, col 13))

from ember-calendar.

matteodepalo avatar matteodepalo commented on August 15, 2024

Did you add the basic application controller as stated in the readme?

// app/controllers/index.js

import Ember from 'ember';

export default Ember.Controller.extend({
  occurrences: Ember.A(),

  actions: {
    calendarAddOccurrence: function(occurrence) {
      this.get('occurrences').pushObject(Ember.Object.create({
        title: occurrence.get('title'),
        startsAt: occurrence.get('startsAt'),
        endsAt: occurrence.get('endsAt')
      }));
    },

    calendarUpdateOccurrence: function(occurrence, properties) {
      occurrence.setProperties(properties);
    },

    calendarRemoveOccurrence: function(occurrence) {
      this.get('occurrences').removeObject(occurrence);
    }
  }
});

from ember-calendar.

matteodepalo avatar matteodepalo commented on August 15, 2024

That's mostly needed for the occurences array which is otherwise undefined.

from ember-calendar.

matteodepalo avatar matteodepalo commented on August 15, 2024

Version 0.1.4 is out, fixing the dependency issues you've found. I'm going to close this but feel free to open another issue if you encounter other problems!

from ember-calendar.

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.