Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

datewise

Gagik-arch588ISC2.0.11TypeScript support: included

Calendar for javascript (type script) projects.

datewise, calendar, javascript calendar, js calendar, date picker, ts calendar, type script calendar, date

readme

This calendar is intended to be consumed for all of type javascript projects.

Table of contents

Installation

$ npm install datewise

We need stars (🌟🌟🌟🌟) to make available the package in cdnjs
please add star in git repository thank you all.

Usage

import Calendar from 'datewise';

const calendar = new Calendar();

Arguments

Type Default value
Date {Object} new Date()
Intl locales 'en-US'

Calendar Methods

Method argument return type
toDate Date {Object} void
toPrevMonth none void
toNextMonth none void
toNextYear none void
toPrevYear none void
changeLocale locale:string void

Day Methods

Method argument return type
isWeekEnd none boolean

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();
//  calendar.changeLocale('en-US');

    calendar.days[0].isWeekEnd() // boolean
};

Calendar Object

keys values example
locale string 'en-US'
value Date {Object} new Date()
selected Date {Object} new Date()
months string[] ["January",...]
weekDays string[] ["Saturday",...]
days Day[] new Day()

Day Object

keys values example
date Date {Object} new Date()
status TDateStatus 'current-month'

Author