Lighthouse-io / react-visjs-timeline

React component for the vis.js timeline module
MIT License
210 stars 91 forks source link

The items time is not correctly display, it is not the time i set to it? #130

Open linuxfedora2020 opened 2 years ago

linuxfedora2020 commented 2 years ago

Overview

The items time is not correctly display, it is not the time i set to it

Package versions

react-visjs-timeline: latest vis version: latest

Steps to reproduce

Add step by step guide to reproduce issue

  1. Test the code in local broswer
  2. Item 1 display not from 2010, 7, 15

Code Snippet

import logo from './logo.svg';
import './App.css';
import Timeline from 'react-visjs-timeline'

const items = [{
  group: 1,
  start: new Date(2010, 7, 15),
  end: new Date(2010, 8, 2),  // end is optional
  content: 'Trajectory A',
}]

function App() {

  const groups = [{
    id: 1,
    content: 'Group A',
  }]

  return (
    <div className="App">

    <Timeline 
    items={items} 
    groups={groups}
    />

    </div>
  );
}

export default App;

Related issues

Any issue which is related to this issue

Screenshots (if appropriate)