npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@techvootsolutions/react-fullcalendar-custom-ui

v0.0.1

Published

Welcome to the `@techvootsolutions/react-fullcalendar-custom-ui` package! This package is designed to customize the appearance of FullCalendar's month view and week view, specifically focusing on the `dayGridPlugin`.

Downloads

3

Readme

@techvootsolutions/react-fullcalendar-custom-ui

Welcome to the @techvootsolutions/react-fullcalendar-custom-ui package! This package is designed to customize the appearance of FullCalendar's month view and week view, specifically focusing on the dayGridPlugin.

Customize the appearance of calendar event cards in React using HTML.

Note:

- For the successful use of this package, ensure that you have the FullCalendar library installed.
- We currently support custom designs for the `dayGridPlugin` only.

Installation

You can install the package using npm:

npm i @techvootsolutions/react-fullcalendar-custom-ui

Usage

Here's an example of basic usage:

import React from "react";
import { CustomViewDesign } from "@techvootsolutions/react-fullcalendar-custom-ui" // Here you can import cutom design card

const MyCalentdar = () => {
  const sessions = [
    // Your events data here
    {
      id: 1,
      start: "2024-01-01",
      title: "Title",
      groupId: 1,
      session_date: "2024/01/01",
      name: "Test Name",
      duration: "00:00:01",
      slotDuration: "00:00:01",
    },
    ...
  ];
  const [allEvents, setAllEvents] = useState(sessions);
  const monthDesign = ({ item }) => {
    return <p>{item.title}</p>;
  };
  const weekDayDesign = ({ item }) => {
    return <p>{item.title}</p>;
  };
  const monthMainDiv = ({ item }) => {
    return (
      <>
        <p onClick={() => alert(`MonthMainDesignView  ${item.id}`)}>{item.start}</p>
      </>
    );
  };
  return (<div className="FullCalendarCustomStyle">
              <FullCalendar
                plugins={[momentPlugin, dayGridPlugin, interactionPlugin]}
                headerToolbar={{
                  left: "title",
                  center: "",
                  right: "dayGridWeek,dayGridMonth prev,next",
                }} // set header
                views={{
                  dayGridMonth: {
                    titleFormat: { year: "numeric", month: "long" },
                    dayHeaderFormat: { weekday: "long" },
                    slotDuration: "00:00:01",
                    slotMinTime: "00:00:01",
                    slotMaxTime: "00:00:01",
                  },
                  dayGridWeek: {
                    titleFormat: {
                      day: "numeric",
                      month: "long",
                      year: "numeric",
                    },
                    dayHeaderFormat: { day: "numeric", weekday: "long" },
                    slotDuration: "00:00:01",
                    slotMinTime: "00:00:01",
                    slotMaxTime: "00:00:01",
                  },
                }}
                eventOverlap={true} // Allow events to overlap
                slotDuration={"00:00:01"}
                duration={"00:00:01"}
                initialView="dayGridMonth"
                eventContent={(e) => (
                  <CustomViewDesign // Here you can pass our custom design component for customize week view
                    weekView={e} // here is compulsory pass this argument for component
                    WeekDesignView={weekDayDesign} // here you can pass your main view design for week view
                  ></CustomViewDesign>
                )}
                events={allEvents} // show events
                dayCellContent={(e) => (
                  <CustomViewDesign
                    monthView={e} // here is compulsory pass this argument for component
                    allEvents={allEvents} // here is compulsory pass this argument for component
                    MonthDesignView={monthDesign} // here you can pass your dropdown inner design for month view
                    MonthMainDesignView={monthMainDiv} // here you can pass your main view design for month view
                  ></CustomViewDesign>
                )}
              />
            </div>);
};

export default MyCalendar;

Available props

Week view props

  • Here is props you have to pass for week view deign.

| Prop | Type | required | Description | | -------------- | ------------- | -------- | --------------------------------------------- | | weekView | event | true | - | | WeekDesignView | HTML/Function | false | by passing html you can customize your design |

Month view props

  • Here is props you have to pass for month view deign.

| Prop | Type | required | Description | | ------------------- | ------------- | -------- | ------------------------------------------------------------- | | monthView | event | true | - | | allEvents | Array | true | by passing html you can customize your design | | MonthDesignView | HTML/Function | false | by passing html you can customize your month view design | | MonthMainDesignView | HTML/Function | false | by passing html you can customize your main month view design |

CustomViewDesign Component

  • You can customize the appearance of event cards using the CustomViewDesign component. Refer to the CustomViewDesign component for available customization options.

license

  • Feel free to modify this template further to suit your package's specific details and features. It provides a clear structure for users to understand how to use your package, what props are available, and how to customize the appearance.