Giter Site home page Giter Site logo

react-scheduler / react-big-schedule Goto Github PK

View Code? Open in Web Editor NEW
44.0 44.0 11.0 987 KB

React Big Schedule is a powerful and intuitive scheduler and resource planning solution built with React.

Home Page: https://react-big-schedule.vercel.app/

License: MIT License

HTML 0.21% JavaScript 97.89% CSS 1.90%
libraries npm-lib npm-library npm-module npm-package npm-packages package react react-big-schedule react-big-scheduler react-scheduler scheduler

react-big-schedule's People

Contributors

ansulagrawal avatar damyanbg avatar dependabot[bot] avatar jitendrasoni1234 avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-big-schedule's Issues

Refactor src/components/SchedulerData from class to functional component

Checklist

  • I've looked through the README
  • I've verified that I'm running react-big-schedule version 4.2.0
  • I've searched existing feature requests and confirmed that this request is not a duplicate

What problem does this feature solve?

This issue is related to #48 . We want to refactor all class components to functional components.

Proposed Solution

Better

Benefits

Better

Alternatives Considered

No response

Additional Information

No response

Make src/components/index.js from class to functional component

Checklist

  • I've looked through the README
  • I've verified that I'm running react-big-schedule version 4.2.0
  • I've searched existing feature requests and confirmed that this request is not a duplicate

What problem does this feature solve?

Better

Proposed Solution

Better

Benefits

Better

Alternatives Considered

No response

Additional Information

No response

How do i use drag and drop in react-big-schedule

Checklist

  • I've looked through the README
  • I've tested the issue with the latest version of react-big-schedule
  • I've verified that I am running react-big-schedule latest version.
  • I've searched the existing issues and discussions for a similar question
  • I've included steps to reproduce the issue
  • I've checked the browser console for any errors
  • I've provided relevant code snippets or error messages

Please make sure the question is worded well enough to be understood

https://stephenchou1017.github.io/scheduler/#/draganddrop
please visit this link
it is too complicated
i copy same code did not run and also download same file but did not install get error

Is it possible to show cadences other than days on the timeline? I'd like to show weeks/months

Checklist

  • I've looked through the README
  • I've verified that I am running react-big-schedule latest version.
  • I've searched the existing issues and discussions for a similar question
  • I've provided relevant code snippets or error messages
  • I've included steps to reproduce the issue
  • I've checked the browser console for any errors
  • I've tested the issue with the latest version of react-big-schedule

Please make sure the question is worded well enough to be understood

Instead of
image

I'd like to be able to show weeks, e.g
image

Or other cadences, like quarters
image

Find alternative of react-dnd and react-dnd-html5-backend

Checklist

  • I've looked through the README
  • I've verified that I'm running react-big-schedule version 4.2.0
  • I've searched existing feature requests and confirmed that this request is not a duplicate

What problem does this feature solve?

This feature will help to find better solution for the core functionality of the library.

Proposed Solution

My first solution in mind is to implement our own drag and drop functionality.

Benefits

Better maintenance.

Alternatives Considered

No response

Additional Information

No response

How can I display a specified date range?

Checklist

  • I've looked through the README
  • I've verified that I am running react-big-schedule latest version.
  • I've searched the existing issues and discussions for a similar question
  • I've provided relevant code snippets or error messages
  • I've included steps to reproduce the issue
  • I've checked the browser console for any errors
  • I've tested the issue with the latest version of react-big-schedule

Please make sure the question is worded well enough to be understood

How can I display a specified date range? Like startDate=2023-12-15,endDate=2024-01-05,

Meeting block relative length always takes "whole day" on the week view

Checklist

  • I've looked through the README
  • I've verified that I'm running react-big-schedule version 4.2.0
  • I've searched existing feature requests and confirmed that this request is not a duplicate

What problem does this feature solve?

62401223-8c8df400-b582-11e9-8163-e12405e0fb7d

If the event is set from 10AM to 11PM same day, or 2PM today to 3PM tommorow, the tab showing existence of that event is shown as 100% fill of a day when view is set to week, or 100% fill of both days when it is a part of one day and next day (it assumes that it is "whole day" but in reality it is not, how can I show the actual graphical representation of time reserved in a day ?
I want to have more like "timeline" feel.
And i want to be able to add meeting from 2PM today to 10AM tomorrow, and next meeting from 11 AM tomorrow to 4PM tomorrow. And be able to show the relative length of the block representing that meeting in the day.

Proposed Solution

Right now we need to check on the tooltip what is the actual length of the event, and it would be much better to show it/visualize it.

Benefits

If there is an option to do that, please point me to the proper example or just tell how to do that.
I hope I have explained it clearly
Thank You

Alternatives Considered

No response

Additional Information

No response

How do I use DND function

Checklist

  • I've looked through the README
  • I've verified that I am running react-big-schedule latest version.
  • I've searched the existing issues and discussions for a similar question
  • I've provided relevant code snippets or error messages
  • I've included steps to reproduce the issue
  • I've checked the browser console for any errors
  • I've tested the issue with the latest version of react-big-schedule

Please make sure the question is worded well enough to be understood

Please help me to find DND

Additional data fields in event and display then in eventPopover

Checklist

  • I've looked through the README
  • I've verified that I am running react-big-schedule version 4.2.0 or above.
  • I've searched the existing issues and discussions for a similar question
  • I've provided relevant code snippets or error messages
  • I've included steps to reproduce the issue
  • I've checked the browser console for any errors
  • I've tested the issue with the latest version of react-big-schedule

Please make sure the question is worded well enough to be understood

Is there a possiblity to display in popover additional data fields for events (e. g. total sales revnue, next event for same resource).

Regarding viewType

Checklist

  • I've looked through the README
  • I've verified that I am running react-big-schedule latest version.
  • I've included steps to reproduce the issue
  • I've searched the existing issues and discussions for a similar question
  • I've provided relevant code snippets or error messages
  • I've checked the browser console for any errors
  • I've tested the issue with the latest version of react-big-schedule

Please make sure the question is worded well enough to be understood

image

in this i want only month, quarter and year in viewType how to do it?

clone.localeData is not a function crash on calendar popover

Checklist

  • I've looked through the README
  • I've verified that I am running react-big-schedule version 4.2.0 or above.
  • I've searched the existing issues and discussions for a similar question
  • I've provided relevant code snippets or error messages
  • [] I've included steps to reproduce the issue
  • I've checked the browser console for any errors
  • I've tested the issue with the latest version of react-big-schedule

Please make sure the question is worded well enough to be understood

I am currently getting crashes when I try to open the calendar popover, I have set the locales as well according to the documentation but that didnt work and I have done it without it as well. It has been fairly temperamental because very rarely it did work fine, I cant recreate or remember what the situation was when it was working fine sadly.

I have noticed that it works fine in react-big-scheduler-stch, but it crashes the website in here, presumably because of the addition of dayjs, below is my code:

  const dispatch = useDispatch();

  const schedulerParentRef = useRef();
  var today = new Date();
  var date = today.getFullYear() + "-" + (today.getMonth() + 1) + "-" + today.getDate();
  let schedulerData = new SchedulerData(
    date,
    ViewType.Day, // Change the status of daily, weekly or monthly
    false,
    false,
    {
      eventItemPopoverPlacement: "bottomRightMousePosition",
      responsiveByParent: true,
      besidesWidth: window.innerWidth <= 1600 ? 100 : 350,
      startResizable: false,
      endResizable: false,
      schedulerContentHeight: "100%",
      weekResourceTableWidth: window.innerWidth * 0.1,
      dayResourceTableWidth: window.innerWidth * 0.1,
      monthResourceTableWidth: window.innerWidth * 0.1,
      yearResourceTableWidth: window.innerWidth * 0.1,
      weekCellWidth: 80,
      dayCellWidth: 40,
    }
  );
  schedulerData.setResources([]);
  schedulerData.setEvents([]);
  
    const prevClick = (schedulerData) => {
    schedulerData.prev();
    schedulerData.setEvents(Events);
    dispatch(setViewModel(schedulerData));
  };

  const nextClick = (schedulerData) => {
    schedulerData.next();
    schedulerData.setEvents(Events);
    dispatch(setViewModel(schedulerData));
  };

  const onViewChange = (schedulerData, view) => {
    schedulerData.setViewType(view.viewType, view.showAgenda, view.isEventPerspective);
    schedulerData.setEvents(Events);
    dispatch(setViewModel(schedulerData));
  };

  const onSelectDate = (schedulerData, date) => {
    schedulerData.setDate(date);
    schedulerData.setEvents(Events);
    dispatch(setViewModel(schedulerData));
  };


      <div className="w-full" ref={schedulerParentRef}>
      {displayTimeline && (
        <div className="-mt-4" style={{ marginLeft: "auto" }}>
          <Scheduler
            parentRef={schedulerParentRef}
            schedulerData={viewModel}
            prevClick={prevClick}
            nextClick={nextClick}
            onSelectDate={onSelectDate}
            onViewChange={onViewChange}
            eventItemClick={eventClicked}
            viewEventClick={ops1}
            viewEventText="Details"
          />
        </div>
      )}
  

Below is the crash error:

image

What would I have done incorrectly here? Any help is appreciated.

Scheduler does not respect the size of the parent container. (version 4.2.1)

Checklist

  • I've verified that I'm running react-big-schedule version 4.2.0 or higher

Describe the bug

Placed the in a container and it goes out of the container.

Reproduction Link/Code

Using the grid from ant.design:


<Layout className="">
  <Sider />
  <Layout>
    <Header />
    <Content>
      <Row>
       <Col span={24}>

          .... ant tabs container / content etc ......

            <Row gutter={[32, 32]}>
                <Col span={24}>
                    <div className="schedular-container">
                        <Scheduler
                            schedulerData={schedulerData}
                            prevClick={prevClick}
                            nextClick={nextClick}
                            onSelectDate={onSelectDate}
                            onViewChange={onViewChange}
                            eventItemClick={eventClicked}
                        />
                    </div>
                </Col>
            </Row>

          .... end  ant tabs container / content etc ......

          </Col>
        </Row>
      </Content>
  </Layout>
</Layout>

Steps to reproduce

While resizing the window browser it adjust the table width the same as window size, and it does not take the sidebar into account.

Operating System

MAC OSX

Browser

Chromium engine / Safari

React version

18.2.0

react-big-schedule version

4.2.1

Additional Information

No response

While installing react-big-scheduler getting error

Checklist

  • I've looked through the README
  • I've verified that I am running react-big-schedule version 4.2.0 or above.
  • I've searched the existing issues and discussions for a similar question
  • I've provided relevant code snippets or error messages
  • I've included steps to reproduce the issue
  • I've checked the browser console for any errors
  • I've tested the issue with the latest version of react-big-schedule

Please make sure the question is worded well enough to be understood

I was using react-big-scheduler, in that package we faced event display issue if we create event before 5:30 AM.
As per your suggestion I tried to install react-big-schedule package.
Old package was deleted with all the references.
Installed react-big-schedule package.
while gulp build facing error.

Please find below error -

[13:28:39] Error - [tsc] node_modules/react-big-schedule/dist/index.d.ts(129,20): error TS1110: Type expected.
[13:28:39] Error - [tsc] node_modules/react-big-schedule/dist/index.d.ts(130,16): error TS1109: Expression expected.

Example with redux

Checklist

  • I've looked through the README
  • I've verified that I am running react-big-schedule version 4.2.0 or above.
  • I've searched the existing issues and discussions for a similar question
  • I've provided relevant code snippets or error messages
  • I've included steps to reproduce the issue
  • I've checked the browser console for any errors
  • I've tested the issue with the latest version of react-big-schedule

Please make sure the question is worded well enough to be understood

Hello, Is it possible to have an example of how to use library with Redux Toolkit?

Remove react-dnd and react-dnd-html5-backend due to Lack of Maintenance

Description:
After careful consideration, we have decided to remove the dependencies on react-dnd and react-dnd-html5-backend from our project. This decision is primarily driven by the fact that these libraries are no longer actively maintained by their respective teams. As a result, relying on them poses potential risks and may hinder our ability to address future issues or introduce new features.

To ensure the long-term stability and maintainability of our project, we need to remove the dependencies on react-dnd and react-dnd-html5-backend.

Tasks:

Update package.json: Remove the entries for react-dnd and react-dnd-html5-backend from the "dependencies" section.
Remove Imports: Locate and remove any import statements related to react-dnd and react-dnd-html5-backend in the relevant files.
Refactor Components: If any components rely on react-dnd and react-dnd-html5-backend, refactor them to use an alternative drag-and-drop solution that is actively maintained and aligned with our project requirements.
Update Tests: If tests exist for components or functionality affected by this change, update them accordingly to reflect the removal of react-dnd and react-dnd-html5-backend.
By removing these dependencies, we aim to mitigate potential risks and ensure that our project remains up-to-date with actively maintained libraries. We understand that this removal may require additional adjustments to code and components, and we will perform thorough testing to ensure the stability and functionality of the application post-removal.

If you have any questions or concerns regarding this issue, please feel free to reach out. Your cooperation in removing react-dnd and react-dnd-html5-backend from our project is crucial to maintaining the project's health and sustainability. Thank you for your support.

Refactor HeaderView component from class to functional

Checklist

  • I've looked through the README
  • I've verified that I'm running react-big-schedule version 4.2.0
  • I've searched existing feature requests and confirmed that this request is not a duplicate

What problem does this feature solve?

This issue is related to #48 and it is connected only to HeaderView component.

Proposed Solution

Better

Benefits

Functional programming

Alternatives Considered

No response

Additional Information

No response

Cannot read properties of undefined (reading 'time') or (reading 'end')

Checklist

  • I've verified that I'm running react-big-schedule latest version.

Describe the bug

When I click on an empty area in calendar, I see the below error message

image

image
For example, if I click on the grey area below 3/12.

Sometimes, the error says reading 'end'. Below is the error in the console:

image

As a workaround, I am okay to just disable clicking in empty area in calendar but I don't see any such prop that allows me to do that.

Reproduction Link/Code

I am just using the example in the repository.

Steps to reproduce

  1. Tap on the empty day
  2. Observe the error

Operating System

Mac

Browser

Edge

React version

18.2.0

react-big-schedule version

4.4.0

Additional Information

No response

setSchedulerLocale & localeDayjs.locale not working

Checklist

  • I've verified that I'm running react-big-schedule version 4.2.0 or higher

Describe the bug

The localization of the date items are not working.

Reproduction Link/Code

I have tried this configurations:

import * as dayjsLocale from 'dayjs/locale/nl';
schedulerData.setSchedulerLocale(dayjsLocale);

and

schedulerData.localeDayjs.locale('nl_NL');
schedulerData.setSchedulerLocale('nl_NL');

and

schedulerData.localeDayjs.locale('nl');
schedulerData.setSchedulerLocale('nl');

Nothing happend, also no error's. Also tried to use the br-pt local, but also not changing.

Steps to reproduce

See above.

Operating System

Mac

Browser

Chromium

React version

18.2

react-big-schedule version

4.2.1

Additional Information

No response

ViewType.Day not displaying hour headers properly

Checklist

  • I've looked through the README
  • I've verified that I am running react-big-schedule latest version.
  • I've searched the existing issues and discussions for a similar question
  • I've provided relevant code snippets or error messages
  • I've included steps to reproduce the issue
  • I've checked the browser console for any errors
  • I've tested the issue with the latest version of react-big-schedule

Please make sure the question is worded well enough to be understood

for ViewType Day, only showing first hour of the day as header, all other ViewType working properly

Screenshot 2024-02-09 124432

Multi-day events can overwrite later scheduled events in renderer

Checklist

  • I've verified that I'm running react-big-schedule latest version.

Describe the bug

If a multi day event is included in the events set after another event then currently a bug will "overwrite" the event that appears before it when _createRenderData runs in SchedulerData.

Reproduction Link/Code

I don't have a standalone example but I believe the commented out line 1097 in SchedulerData is intended to prevent this:

// this.events.sort(this._compare);

Because the value of let pos = -1; is not being reset to -1 within the following resourceEvents.headerItems.forEach then the check that pos = -1 doesn't always run and thus pos is not updated to the correct value for multi day events.

Steps to reproduce

You need to add some events where the first event is on a specific date and the second event spans multiple days including the date of the first event.

Operating System

All

Browser

All

React version

Latest

react-big-schedule version

Latest

Additional Information

No response

Example for running the basic version using React Hooks

Checklist

  • I've looked through the README
  • I've verified that I'm running react-big-schedule version 4.2.0
  • I've searched the existing issues and discussions for a similar question
  • I've provided relevant code snippets or error messages
  • I've included steps to reproduce the issue
  • I've checked the browser console for any errors
  • I've tested the issue with the latest version of react-big-schedule

Please make sure the question is worded well enough to be understood

Hi, Is it possible to have an example of how to use this in React Hooks?

thx!

remove title={} from resource

Checklist

  • I've verified that I'm running react-big-schedule version 4.2.0 or higher

Describe the bug

Using JSX on the resource setter:

{
                        id: element.product_id,
                        parentId: 0,
                        title: element.product_name,
                        name: <Flex justify="space-between" gap={5}>
                                <div className="product-label">{element.product_name}</div>
                            </Flex>,
                    }

The title on the resource buttons gives: [object Object]. Not sure why this title's has been set. You can find it here:

<div style={{ width }} title={resourceEvents.slotName} className="overflow-text header2-text">

and here:

<div title={item.slotName} className="overflow-text header2-text" style={{ textAlign: 'left' }}>

Possible to rename to title={resourceEvents.slotTitle} instead of using title={resourceEvents.slotName}.

Also, make more send to have this aligned using the title from the resource setter instead of the name.

Reproduction Link/Code

Scherm­afbeelding 2023-11-09 om 09 52 03 Scherm­afbeelding 2023-11-09 om 09 52 07

Steps to reproduce

Using "react-big-schedule": "^4.3.2",

Operating System

MacOSX

Browser

Chromium

React version

18.2

react-big-schedule version

"react-big-schedule": "^4.3.2",

Additional Information

No response

Scheduler width adjustment

Checklist

  • I've looked through the README
  • I've verified that I am running react-big-schedule latest version.
  • I've searched the existing issues and discussions for a similar question
  • I've provided relevant code snippets or error messages
  • I've included steps to reproduce the issue
  • I've checked the browser console for any errors
  • I've tested the issue with the latest version of react-big-schedule

Please make sure the question is worded well enough to be understood

how to adjust scheduler width as per outer div width

Is it possible to have the antd ConfigProvider consumd / wrap?

Checklist

  • I've looked through the README
  • I've verified that I'm running react-big-schedule version 4.2.0
  • I've searched existing feature requests and confirmed that this request is not a duplicate

What problem does this feature solve?

I would like to use the Customize Design Token like described here: https://ant.design/docs/react/customize-theme.

Because this integration is using Ant Design already, it is probably easy to add?

Proposed Solution

This is a very basic example of how to use the theme / custom settings:

import { Scheduler,  } from 'react-big-schedule';
import { ConfigProvider, theme,  } from 'antd';

const App = () =>{
  const { useToken } = theme;
  const { token } = useToken();

  return(
   <ConfigProvider
                            theme={{
                                token: {
                                    colorPrimary: token.colorPrimary,
                                    colorPrimaryHover: token.colorPrimaryHover,
                                    borderRadius: token.borderRadius,
                                },
                            }}>
                            <Scheduler {...props}  />
                        </ConfigProvider>
)}

Benefits

The Scheduler got the same colors and gui setup as the rest of the antd application config.

Alternatives Considered

No response

Additional Information

No response

Import { Scheduler } not working in typescript / nextjs

Checklist

  • I've verified that I'm running react-big-schedule version 4.2.0 or higher

Describe the bug

When importing the modules in a typescript / nextjs environment, there is an error with importing Scheduler. When imported as the Default import (i.e) outside the bracket, we get this error when running the app:

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.

However if its imported as a named export we dont get an app error, but we get a TS error:

Module '"react-big-schedule"' has no exported member 'Scheduler'.

We work within a strict TS environent so any help would be greatly appreciated!

Reproduction Link/Code

https://github.com/Cambrai2/react-big-schedule

Steps to reproduce

reproduceable by running:

npm create t3-app@latest

and importing the react-big-schedule and trying to use.

Operating System

Linux

Browser

Chrome

React version

18.2.0

react-big-schedule version

^4.3.2

Additional Information

No response

scheduler does not conform to the outside parent div

Checklist

  • I've verified that I'm running react-big-schedule version 4.2.0 or higher

Describe the bug

The scheduler does not conform to the outside parent div no matter what I try, the second issue is that when I change the viewType, from day to week or month, the entire scheduler expands outside the div and will not look functional.

Currently the scheduler does not conform to the outside div:

266804314-cd7c7c2e-f373-4c9f-9bd0-44875642e45e

If I change to week:

image

If I rerender the component it reshapes itself back to a normal size, but its still not conforming to the outside div.

image

I have tried the

  1. responsiveByParent route hbatalhaStch/react-big-scheduler#26
  2. #52
    Which is running react not in strict mode, my production version has the same identical issues.
  3. besidesWidth: window.innerWidth <= 1600 ? 100 : 350, // you need to add this

None have worked so far, from my understanding it seems that the resource table have a dynamic width that increases its size dependent on the width rather than the events table.

What could it be and what should I be trying? I would really like this to work in my application.

Reproduction Link/Code


  const schedulerParentRef = useRef();
  var today = new Date();
  var date = today.getFullYear() + "-" + (today.getMonth() + 1) + "-" + today.getDate();
  let schedulerData = new SchedulerData(
    date,
    ViewType.Day, // Change the status of daily, weekly or monthly
    false,
    false,
    {
      eventItemPopoverPlacement: "bottomRightMousePosition",
      responsiveByParent: true,
      besidesWidth: window.innerWidth <= 1600 ? 100 : 350,
      startResizable: false,
      endResizable: false,
      schedulerContentHeight: "100%",
      weekCellWidth: 80,
      dayCellWidth: 40,
    }
  );
  schedulerData.setResources([]);
  schedulerData.setEvents([]);

  useEffect(() => {
    dispatch(initialiseViewModel(schedulerData));

    return () => dispatch(reInitialiseViewModel());
  }, [date, dispatch, initialiseViewModel, reInitialiseViewModel]);

  const changeDate = (e) => {
    setDateState(e);
  };

  const getResources = useCallback(() => {
    getAuthorization()
      .get(`company/get_companyschedule_recources?assigned_to=${DropDownValue}`)
      .then((res) => {
        setResources(res.data.message ? [] : res.data);
        dispatch(setAPIDetailsUser(res.data.message ? [] : res.data));
        getEvents(); // Get events after resources have been set
      })
      .catch((err) => {
        console.log("Error in getting schedule", err);
      });
  }, [dispatch, DropDownValue]);

  const getEvents = useCallback(() => {
    getAuthorization()
      .get(`company/get_companyschedule_events?assigned_to=${DropDownValue}`)
      .then((res) => {
        setEvents(res.data.message ? [] : res.data);
        dispatch(setAPIDetailsUserEvents(res.data.message ? [] : res.data));
        setDataLoaded(true); // Set dataLoaded to true after both resources and events are set
      })
      .catch((err) => {
        console.log("Error in getting schedule", err);
      });
  }, [dispatch, DropDownValue]);

  //Set Scheduler Data
  useEffect(() => {
    if (dataLoaded) {
      viewModel.setResources(Resources);
      viewModel.setEvents(Events);
      dispatch(setViewModel(viewModel));
      setDataLoaded(false); // Reset after processing the loaded data
    }
  }, [dataLoaded, Resources, Events, DropDownValue]);

  useEffect(() => {
    setDataLoaded(false); // Reset the dataLoaded state before fetching
    getResources();
  }, [DropDownValue, getResources]);

  const prevClick = (schedulerData) => {
    schedulerData.prev();
    schedulerData.setEvents(Events);
    dispatch(setViewModel(schedulerData));
  };

  const nextClick = (schedulerData) => {
    schedulerData.next();
    schedulerData.setEvents(Events);
    dispatch(setViewModel(schedulerData));
  };

  const onViewChange = (schedulerData, view) => {
    schedulerData.setViewType(view.viewType, view.showAgenda, view.isEventPerspective);
    schedulerData.setEvents(Events);
    dispatch(setViewModel(schedulerData));
  };

  const onSelectDate = (schedulerData, date) => {
    schedulerData.setDate(date);
    schedulerData.setEvents(Events);
    dispatch(setViewModel(schedulerData));
  };

  const eventClicked = (schedulerData, event) => {
    setOpen(true);
    getAuthorization()
      .get(`company/schedule_view/${event.id}/`)
      .then((res) => {
        setScheduleDetails(res.data);
        setDateState([new Date(`${res.data.start_date}`), new Date(`${res.data.end_date}`)]);
      })
      .catch((err) => {
        console.log("Error in getting schedule details", err);
      });
  };

  const ops1 = (schedulerData, event) => {
    setOpen(true);
    getAuthorization()
      .get(`company/schedule_detail/${event.id}/`)
      .then((res) => {
        setScheduleDetails(res.data);
      })
      .catch((err) => {
        console.log("Error in getting schedule details", err);
      });
    // alert(
    //   `You just executed ops1 to event: {id: ${event.id}, title: ${
    //     event.title
    //   }}`
    // );
  };
  
    return (
    <div className="w-full" ref={schedulerParentRef}>
      {displayTimeline && (
        <div className="-mt-4" style={{ marginLeft: "auto" }}>
          <Scheduler
            parentRef={schedulerParentRef}
            schedulerData={viewModel}
            prevClick={prevClick}
            nextClick={nextClick}
            onSelectDate={onSelectDate}
            onViewChange={onViewChange}
            eventItemClick={eventClicked}
            viewEventClick={ops1}
            viewEventText="Details"
          />
        </div>
      )}

Steps to reproduce

  1. view scheduler and notice that its not the right size
  2. click on week and it jumps outside of the div

Operating System

windows

Browser

firefox

React version

^18.0.2

react-big-schedule version

^4.2.5

Additional Information

No response

Fix ESLint Errors in Several Files

In the react-big-schedule project, several ESLint errors need to be addressed to ensure consistent code quality and avoid potential bugs. The affected files are:

  1. react-big-schedule/src/components/SchedulerData.js
  2. react-big-schedule/src/components/DnDSource.js
  3. react-big-schedule/src/components/DnDContext.js

Each file needs to be reviewed and updated to comply with the project's ESLint rules. Please note the importance of not disabling the ESLint rules globally or within the files, as this might mask other potential issues.

Please use the npm run lint command after making the changes to ensure that all ESLint errors have been successfully fixed.

Thanks in advance for your attention to this issue.

Request for Assistance in Converting Project to functional based totally.

I have been working on my project using a different architecture, but after considering the benefits of functional programming, I have decided to switch to a functional-based approach. This transition will not only align with industry standards but also enhance the maintainability and scalability of my project.

I understand that functional programming promotes immutability, pure functions, and declarative code, which can lead to more predictable and easier-to-test applications. By embracing these principles, I believe my project will become more robust and efficient.

However, I am relatively new to functional programming and would greatly appreciate your guidance and expertise in refactoring my codebase. I am confident that with your assistance, I will be able to successfully migrate my project to a functional-based architecture.

I have already done some initial research and identified areas in my project that can benefit from functional transformations. By adopting higher-order functions, leveraging immutable data structures, and embracing functional composition, I hope to optimize the performance and readability of my code.

Once again, I want to express my gratitude for your willingness to support me in this endeavor. Your expertise and guidance will undoubtedly contribute to the success of my project. Thank you for your assistance and I look forward to working together on this functional conversion.

Request for Assistance in Converting Project to TypeScript

I would like to request assistance in converting my project to TypeScript. As I am currently learning TypeScript, my knowledge in this area is limited. Therefore, I am seeking the help of someone who is knowledgeable in TypeScript to guide me through the conversion process. I greatly appreciate any support that can be provided. Thank you in advance for your help.

how do i use Drag and drop feature in react-big-schedule?

Checklist

  • I've looked through the README
  • I've verified that I am running react-big-schedule latest version.
  • I've tested the issue with the latest version of react-big-schedule
  • I've searched the existing issues and discussions for a similar question
  • I've provided relevant code snippets or error messages
  • I've included steps to reproduce the issue
  • I've checked the browser console for any errors

Please make sure the question is worded well enough to be understood

image

errorMsg:
(0 , react_dnd__WEBPACK_IMPORTED_MODULE_0__.DndContext) is not a function

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.