Calendar Widget

Preview


About

This is a simple web calendar, which shows your system date in day, week, month and year format.

How to add?

By hotlinking:

Put this script on your HTML document.

<script src="https://404city.neocities.org/widget/calendar.js"></script>

By uploading on your site:

Click here to download script! Then, upload it on your site and put this line on your HTML document.

<script src="YOUR_SCRIPT_PATH_HERE"></script>


ID and Class Informations:

Here are the ID and Class definitions of calendar's elements. You can use them on your CSS file to customize your calendar!


ID/ClassElement TypeDescription
#calendardivMain body of the calendar.
#calendarHeaderdivDisplays month and year.
#calendarGriddivContainer grid of calendar cells and days of the week.
.calendarDayOfTheWeekdivCells which represents the days of the week.
.calendarCelldivDefault cells which are the day numbers of the calendar..
.calendarNonMonthDaydivMarks the days outside the current month. Make sure to put it after the .calendarCell class.
.calendarTodaydivMarks the current day. Make sure to put it after the .calendarCell class.

Default CSS Definements

:where(#calendarHeader, .calendarDayOfTheWeek, .calendarCell) {
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, Helvetica, sans-serif;
    border: 1px solid black;
    color: black;
    cursor: default;
    user-select: none;
}
:where(#calendar) {
    box-sizing: border-box;
    display: grid;
    grid-template-rows: 1.25fr 7fr;
    height: 260px;
    width: 260px;
    border: 1px solid black;
    padding: 2px;
    gap: 2px;
    font-size: 14px;
}
:where(#calendarGrid) {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
:where(#calendarHeader) {
    font-weight: bold;
    font-size: 1.5em;
    white-space: nowrap;
}
:where(.calendarDayOfTheWeek) {
    font-weight: bold;
}
:where(.calendarNonMonthDay) {
    color: gray;
}
:where(.calendarToday) {
    background-color: black;
    color: white;
}

Update Log

12 November 2025, Wednesday
9 November 2025, Sunday
14 August 2025, Thursday
13 August 2025, Wednesday
10 August 2025, Sunday