DEV Community

OnePassApps
OnePassApps

Posted on

One to 24 Months, 1900 to 2200 Years: The Calendar Maker's Two Number Fields at Their Edges

I work on OnePassApps, so this is our own app, and every figure below was measured in it in a signed-out Chrome session on 7 November 2026.

The Calendar Maker takes two numbers: how many months to print, and which year to start from. Both are HTML number inputs, both carry a min and a max, and both refuse - silently - to hold anything outside those bounds. This post is about the edges: what the field reads back, what the page count becomes, and what the exported setup file keeps.

The two fields, and which one tells you its range

Stage 01 Layout and start holds three layout cards (Year, Months, Weeks), a Start month combobox, a Start year field and a Months field.

The Months field prints its own range on the label under the number: Months (1 to 24). It ships at 12, and the app opens on the Months layout with the output line reading 12 pages · A4 landscape.

The Start year field ships at 2026 and its label reads only Start year. The strings 1900 and 2200 appear nowhere in the panel's visible text - I checked the whole rendered page for both and found neither. The year bound is real, but the app does not print it: it lives in the input's attributes (min 1900, max 2200) and in the guide page, which says "Years run from 1900 to 2200". A reader of the app alone never sees the two numbers that decide what happens when you type too far.

Typing past the end changes the number, not the message

I typed into the fields and read each one back:

  • Start year, typed 25 - the field reads 1900
  • Start year, typed 2201 - the field reads 2200
  • Start year, typed 1899 - the field reads 1900
  • Months, typed 25 - the field reads 24
  • Months, typed 0 - the field reads 1

No warning appears. I searched the visible panel text for between, at most, minimum, maximum and similar wording after each attempt and found none of them: there is no "the year must be between 1900 and 2200" line to tell you your number was moved for you. The page count just quietly becomes the page count of the value you ended up with.

Whether the browser's own number-input handling or the app does the clamping, I could not separate from the DOM alone. What is certain is the observable part: the field reads back the bound, and the exported file below keeps the bound.

One month prints one page, and it says so in the singular

At Months 1 the output line reads 1 page · A4 landscape - singular - the preview header reads A4 · landscape · 1 page, and the pager reads Page 1 of 1. At Months 24 the same three lines read 24 pages · A4 landscape, A4 · landscape · 24 pages and Page 1 of 24. The page count equals the month count exactly, and the word changes with the number.

The exported file keeps the clamped year

Export setup JSON at start year 2200 wrote calendar-month-2200-01.json to disk - 331 bytes. At start year 1900 it wrote calendar-month-1900-01.json, also 331 bytes. The file name encodes the layout, the year and the start month, so the clamped year ends up in the name.

Both files hold the same settings block, with startYear the only difference:

{
  "app": "calendar-maker",
  "version": 1,
  "settings": {
    "layout": "month",
    "startYear": 2200,
    "startMonth": 1,
    "weekStart": "monday",
    "weekNumbers": false,
    "paper": "a4",
    "orientation": "landscape",
    "title": "",
    "notes": true,
    "monthCount": 24,
    "weekCount": 52
  },
  "events": []
}
Enter fullscreen mode Exit fullscreen mode

After the export the panel prints Setup and events downloaded as JSON., and it also carries the line Your changes live only in this tab until you print or export them.

What I did not test

The Paper and Orientation comboboxes, the Show week numbers and Notes lines switches (their states in the export above come from the exported file, not from clicking them), the print button, and what the import does with a file whose year sits outside 1900 to 2200.

Try it

The app: Calendar Maker and its guide.

I work on OnePassApps, the team behind app.onepassapps.com.

Top comments (0)