Search
Enter at least two characters without personal information.

    LibraryArticles & FAQ Your projectRequest a quote
    LanguageEN
    Practical guides

    Design date input and a booking calendar

    Choosing a date can mean entering a birth date, requesting an appointment or booking a stay. These tasks do not require identical controls. Define the expected data and consequence before drawing a calendar.

    Go to the method

    Paper calendar and date selection on a phone
    AI-generated illustration

    Separate date, slot and booking

    A calendar date does not identify an instant in a time zone. An appointment also has time, duration and a time context. Selecting a date does not guarantee availability. Name the stages separately: requested date, offered slot and confirmed booking.

    For a stay, explain arrival and departure meaning and applicable conditions. For an old date, suitable entry may avoid dozens of month changes. Frequency and whether someone already knows the date matter more than an aesthetic preference for a calendar.

    Choose native input or a custom calendar

    Four dates seven days apart from 2 to 23 November 2026; November 10 misses the step.
    Illustration · Fictional exercise: min anchors the step. Circled dates satisfy the field constraints; the cross marks November 10 off the step. This diagram does not show actual availability.

    The HTML date input uses browser and platform-dependent presentation with a normalised year-month-day value. It contains no time. Displayed format can vary; labels and instructions should remain understandable.

    The W3C date-picker example combines entry and a calendar. A custom version adds keyboard, focus and announcement work. Check target devices and keep a clear way to enter or correct the date.

    Fictional exercise: a date field has min="2026-11-02", max="2026-11-23" and step="7". The step counts days from min: 2, 9, 16 and 23 November satisfy these constraints. November 10 falls within the range but misses the step; November 30 exceeds the upper limit. This regular pattern does not represent public holidays or the service’s actual availability.

    Separate three checks: a possible calendar date, the field’s constraints and the real ability to book. A submitted value of 2026-11-09 contains no time. If the browser adjusts input to a permitted value, review the resulting date in the summary. Repeat validation on the server and check capacity before confirming; the displayed calendar is not evidence of a booking.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Fictional exercise: bounds and a seven-day step
    Submitted valuemin, max and step constraintsDecision still required
    2026-11-02Minimum boundary allowedCheck actual availability
    2026-11-09One step after the minimumCheck actual availability
    2026-11-10Within bounds, off the stepExplain the rule and allow correction
    2026-11-30Beyond maxReject this date and offer correction

    Validate meaning and availability

    The server needs to validate date, limits and availability on submission. A calendar shown minutes earlier may be out of date. If a slot has gone, preserve other information and offer an explicit alternative rather than restarting the whole journey.

    Show the appointment’s time context when participants may be in different countries. Review page, summary and email together. A differently formatted date must not become a different day through unnecessary conversion. Test a month boundary, leap year and withdrawn availability.

    Example: request an intervention

    Educational example: a form collects a preferred date and says the team will confirm it. The result says “Request received for 12 November” without claiming a slot is reserved. If actual appointment times are offered later, confirmation includes date, time and time context after service acceptance.

    Reference documents

    Content updated on

    The same displayed time can identify two different instants

    In Paris on 25 October 2026, 02:30 occurs twice: first at offset +02:00, then at +01:00. The initial example compares two instants 60 minutes apart. This calendar example does not represent a real booking.

    Calendar date

    A birth date or arrival date does not automatically become an instant at midnight UTC. Preserve what the value means before converting it.

    Specific appointment

    Connect the confirmed instant to a named zone, such as Europe/Paris. Offset +02:00 describes that instant; it does not replace the zone’s rules for other dates.

    Recurring time

    “Every Monday at 09:00 in Paris” is a local rule. Keep the zone and recurrence; a fixed UTC offset can shift the displayed time after a clock change.

    Elapsed duration: 60 minutes.

    On a small screen, scroll the table horizontally. With a keyboard, focus the table area and use the arrow keys.

    Two UTC instants displayed in three time zones
    UTC instantEurope/ParisAmerica/MontrealIndian/Reunion
    2026-10-25T00:30:00Z2026-10-25 02:30 +02:002026-10-24 20:30 -04:002026-10-25 04:30 +04:00
    2026-10-25T01:30:00Z2026-10-25 02:30 +01:002026-10-24 21:30 -04:002026-10-25 05:30 +04:00

    Conversions use the time zone rules available in your browser. They may change after an update. This comparison checks neither availability nor bookings.

    References : IANA · Time Zone Database · MDN · datetime-local · RFC 3339.

    Acceptance matrix to adapt to your project

    These proposed checks use synthetic cases. Decide the required behaviour with the team, record the result and assign unresolved gaps before release.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Test cases, expected outcomes and useful evidence
    CaseExpected outcomeEvidence to retain
    Known or old dateEntry avoids excessive navigationStarting date, required number of actions and final value without day-month ambiguity.
    Local formatThe same date survives every stageInput, value and summary
    Withdrawn slotAn alternative can be selectedMessage and retained values
    ConfirmationDate and time match the accepted serviceTest page and email

    Frequently asked questions

    Is a calendar always better than typing?

    It may suit nearby availability but be cumbersome for an old date. Compare both by task and device.

    Does a green date mean a booking?

    No. Availability must be checked and the service must confirm booking. Colour does not replace acceptance.

    Does every date need a time zone?

    A calendar date such as birth date is not a time. A timed appointment needs a coherent time context, especially across zones.