Convert Figma logo to code with AI

nhn logotui.calendar

🍞📅A JavaScript calendar that has everything you need.

11,862
1,280
11,862
198

Top Related Projects

Full-sized drag & drop event calendar in JavaScript

gcal/outlook like calendar component

A datepicker for twitter bootstrap (@twbs)

Full view calendar with year, month, week and day views based on templates with Twitter Bootstrap.

Quick Overview

TUI.Calendar is a powerful and customizable JavaScript calendar library developed by NHN. It provides a feature-rich solution for creating various types of calendars, including daily, weekly, and monthly views, with support for events, tasks, and multiple calendars.

Pros

  • Highly customizable with numerous options and themes
  • Supports various calendar views (daily, weekly, monthly)
  • Responsive design and mobile-friendly
  • Extensive API for programmatic control and integration

Cons

  • Steeper learning curve compared to simpler calendar libraries
  • Large file size, which may impact page load times
  • Limited built-in localization support
  • Some users report occasional performance issues with large datasets

Code Examples

  1. Creating a basic calendar:
import Calendar from '@toast-ui/calendar';

const calendar = new Calendar('#calendar', {
  defaultView: 'week',
  useCreationPopup: true,
  useDetailPopup: true
});
  1. Adding an event to the calendar:
calendar.createEvents([
  {
    id: '1',
    calendarId: 'cal1',
    title: 'Meeting',
    start: '2023-05-01T09:00:00',
    end: '2023-05-01T10:00:00'
  }
]);
  1. Changing the calendar view:
calendar.changeView('month');
  1. Subscribing to calendar events:
calendar.on('beforeCreateEvent', (eventObj) => {
  console.log('New event:', eventObj);
});

Getting Started

  1. Install the library:
npm install @toast-ui/calendar
  1. Import and create a calendar instance:
import Calendar from '@toast-ui/calendar';
import '@toast-ui/calendar/dist/toastui-calendar.min.css';

const calendar = new Calendar('#calendar', {
  defaultView: 'week',
  template: {
    time(event) {
      return `<span style="color: ${event.color}">${event.title}</span>`;
    }
  }
});

calendar.createEvents([
  {
    id: '1',
    calendarId: 'cal1',
    title: 'Meeting',
    start: '2023-05-01T09:00:00',
    end: '2023-05-01T10:00:00'
  }
]);

This creates a basic weekly calendar with a custom event template and adds a sample event.

Competitor Comparisons

Full-sized drag & drop event calendar in JavaScript

Pros of FullCalendar

  • More extensive documentation and examples
  • Larger community and ecosystem
  • Better support for various view types (e.g., timeline, resource views)

Cons of FullCalendar

  • Steeper learning curve for advanced features
  • Requires a premium license for some functionality
  • Heavier file size compared to TUI Calendar

Code Comparison

TUI Calendar:

import Calendar from '@toast-ui/calendar';

const calendar = new Calendar('#calendar', {
  defaultView: 'week',
  template: {
    time: function(schedule) {
      return moment(schedule.start.getTime()).format('HH:mm');
    }
  }
});

FullCalendar:

import { Calendar } from '@fullcalendar/core';
import dayGridPlugin from '@fullcalendar/daygrid';

const calendar = new Calendar(calendarEl, {
  plugins: [dayGridPlugin],
  initialView: 'dayGridMonth',
  eventTimeFormat: {
    hour: 'numeric',
    minute: '2-digit',
    meridiem: 'short'
  }
});

Both libraries offer powerful calendar functionality, but FullCalendar provides more extensive features and view options at the cost of a steeper learning curve and potential licensing fees. TUI Calendar is lighter and simpler to use for basic calendar needs.

gcal/outlook like calendar component

Pros of react-big-calendar

  • Specifically designed for React applications, offering seamless integration
  • More customizable and flexible for React developers
  • Active community and regular updates

Cons of react-big-calendar

  • Limited built-in features compared to tui.calendar
  • Steeper learning curve for developers new to React
  • Less comprehensive documentation

Code Comparison

tui.calendar:

import Calendar from '@toast-ui/calendar';

const calendar = new Calendar('#calendar', {
  defaultView: 'week',
  template: {
    time: function(schedule) {
      return moment(schedule.start.getTime()).format('HH:mm');
    }
  }
});

react-big-calendar:

import { Calendar, momentLocalizer } from 'react-big-calendar'
import moment from 'moment'

const localizer = momentLocalizer(moment)

const MyCalendar = props => (
  <Calendar
    localizer={localizer}
    events={myEventsList}
    startAccessor="start"
    endAccessor="end"
    style={{ height: 500 }}
  />
)

Both libraries offer powerful calendar functionality, but react-big-calendar is more suited for React-based projects, while tui.calendar provides a more feature-rich solution out of the box. The choice between them depends on the specific project requirements and the development team's expertise.

A datepicker for twitter bootstrap (@twbs)

Pros of bootstrap-datepicker

  • Lightweight and focused solely on date picking functionality
  • Easy integration with Bootstrap-based projects
  • Extensive browser compatibility, including older versions

Cons of bootstrap-datepicker

  • Limited to date selection only, lacking calendar view and event management
  • Less customizable compared to tui.calendar's advanced features
  • Not as actively maintained, with fewer recent updates

Code Comparison

bootstrap-datepicker:

$('#datepicker').datepicker({
    format: 'mm/dd/yyyy',
    startDate: '-3d'
});

tui.calendar:

const calendar = new Calendar('#calendar', {
    defaultView: 'month',
    taskView: true,
    scheduleView: ['allday', 'time']
});

Summary

bootstrap-datepicker is a simple, lightweight solution for date picking in Bootstrap projects, offering easy integration and broad browser support. However, it lacks the advanced features and customization options of tui.calendar, which provides a full-fledged calendar component with event management capabilities. tui.calendar is more suitable for complex applications requiring extensive calendar functionality, while bootstrap-datepicker is ideal for basic date selection needs in Bootstrap-based websites.

Full view calendar with year, month, week and day views based on templates with Twitter Bootstrap.

Pros of bootstrap-calendar

  • Lightweight and simple to implement
  • Built on top of Bootstrap, making it easy to integrate with existing Bootstrap projects
  • Supports multiple languages out of the box

Cons of bootstrap-calendar

  • Less feature-rich compared to tui.calendar
  • Limited customization options for advanced calendar functionalities
  • Less active development and community support

Code Comparison

bootstrap-calendar:

$('#calendar').calendar({
    tmpl_path: "/tmpls/",
    events_source: function () { return []; }
});

tui.calendar:

const calendar = new Calendar('#calendar', {
    defaultView: 'week',
    taskView: true,
    scheduleView: ['allday', 'time'],
    template: {
        milestone: function(schedule) {
            return '<span style="color:red;">' + schedule.title + '</span>';
        }
    }
});

The code snippets demonstrate that tui.calendar offers more advanced configuration options and customization capabilities, while bootstrap-calendar provides a simpler setup process. tui.calendar allows for more granular control over views, templates, and schedule types, whereas bootstrap-calendar focuses on basic calendar functionality with minimal configuration.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

TOAST UI Calendar

🍞📅 A JavaScript calendar that is full featured. Now your service just got the customizable calendar.

npm GitHub license PRs welcome code with hearth by NHN Cloud

🚩 Table of Contents

📦 Packages

The functionality of TOAST UI Calendar is available when using the Plain JavaScript, React, Vue Component.

📙 Documents

Collect statistics on the use of open source

TOAST UI Calendar applies Google Analytics (GA) to collect statistics on the use of open source, in order to identify how widely TOAST UI Calendar is used throughout the world. It also serves as important index to determine the future course of projects. location.hostname (e.g. > “ui.toast.com") is to be collected and the sole purpose is nothing but to measure statistics on the usage.

To disable GA, refer to the docs below.

📅 Features

✨ Monthly, Weekly, Daily and Various View Types

MonthlyWeekly
imageimage
Daily2 Weeks
imageimage

Easy to Use: Dragging and Resizing a Schedule

DraggingResizing
imageimage

Ready to Use: Default Popups

Creation PopupDetail Popup
imageimage

🎨 Other Features

  • Supports various view types: daily, weekly, monthly(6 weeks, 2 weeks, 3 weeks)
  • Supports efficient management of milestone and task schedules
  • Supports the narrow width of weekend
  • Supports changing start day of week
  • Supports customizing the date and schedule information UI(including a header and a footer of grid cell)
  • Supports adjusting a schedule by mouse dragging
  • Supports customizing UI by theme

💬 Contributing

🌏 Browser Support

Chrome ChromeIE Internet ExplorerEdge EdgeSafari SafariFirefox Firefox
Latest11+LatestLatestLatest

🔩 Dependencies

🍞 TOAST UI Family

🚀 Used By

📜 License

This software is licensed under the MIT © NHN Cloud.

NPM DownloadsLast 30 Days