This project is intended to be consumed for all of type java script projects.
$ npm install calendar-npm
const calendar = new Calendar()
Type | Default value | example |
---|---|---|
Date {Object} | new Date() | const calendar = new Calendar(new Date(2022,7,15)) |
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();
keys | values |
---|---|
currentDate | Date {Object} |
selectedDate | Date {Object} |
months | [string] |
weekDays | [string] |
days | Day{Object} |
- Gagik-arch
- Gagik - Initial work - gagik-arch