Giter Site home page Giter Site logo

Comments (3)

LinkBenjamin avatar LinkBenjamin commented on August 23, 2024

As a note... I used the included example json file as a guide, and I did try formatting the dates & times as strings rather than passing in the long value.

from monthly.

keegars avatar keegars commented on August 23, 2024

Hey there,
I see two problems with your code.

Firstly your api json, should be wrapped by a monthly object such as:

{
  "monthly": [
    {
      "id": 1,
      "name": "This is a JSON event",
      "startdate": "2016-9-15",
      "enddate": "2016-9-18",
      "starttime": "12:00",
      "endtime": "2:00",
      "color": "#FFB128",
      "url": ""
    },
    {
      "id": 2,
      "name": "This is a JSON event",
      "startdate": "2016-10-15",
      "enddate": "",
      "starttime": "12:00",
      "endtime": "2:00",
      "color": "#EF44EF",
      "url": ""
    }
  ]
}

Also as you can see in the example, the time formats aren't in seconds. They must be in a "YYYY-M-D" format for the date and a "H:mm" format for the time. Try the following and see if that helps.

from monthly.

LinkBenjamin avatar LinkBenjamin commented on August 23, 2024

Yeah, I got it working. I missed the wrapper object. I had tried both styles of formatting the times and neither worked... but after I got the wrapper object in place I'm good. Thanks!

from monthly.

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.