calendar-java-script

Calendar for java script projects.


Keywords
calendar
License
ISC
Install
npm install calendar-java-script@1.0.0

Documentation

Calendar-npm

This project is intended to be consumed for all of type java script projects.

Build Status npm version

Table of contents

Installation

$ npm install calendar-npm

Usage

 const calendar = new Calendar()

Arguments

Type Default value example
Date {Object} new Date() const calendar = new Calendar(new Date(2022,7,15))

Methods

Method argument
toDate Date {Object}
toPrevMonth none
toNextMonth none
toNextYear none
toPrevYear none

Example:

const calendar = new Calendar();
const btn = document.getElementByTabName("button")[0];

btn.onclick = () => {
    // calendar.toDate(new Date(2025,5,16));
    // calendar.toPrevMonth();
    // calendar.toNextMonth();
    // calendar.toNextYear();
    // calendar.toPrevYear();
};
import Calendar, { ICalendar, IDay } from "calendar-npm";

const calendar: ICalendar = new Calendar();

Object

keys values
currentDate Date {Object}
selectedDate Date {Object}
months [string]
weekDays [string]
days Day{Object}

Built With

  • Gagik-arch

Author