Skip to content
QA Knowledge Hub

Test cases for a date picker

Updated 2026-11-13 · 6 min read

Thirty date-only booking cases with explicit inclusive limits and a blocked date. Separates native picker presentation from stored values and custom-calendar interaction.

How to answer in an interview

Ask whether the field is a calendar date or an instant, which timezone defines today and whether limits are inclusive. Clarify typed input, disabled dates and range selection before naming cases. A booking date should not change merely because the same record is viewed in another timezone.

Scope and test data

Assume a required booking range using calendar dates, inclusive limits from 2028-02-01 to 2028-03-31, and a blocked date of 2028-02-15. End date may equal start date, but a range must not cross the blocked date. These are example rules, not defaults of every calendar library. Test native date inputs and custom calendars according to their actual design. MDN documents that a native date input value uses yyyy-mm-dd even when its visible presentation is localised. The suite stores calendar dates without converting them into midnight timestamps.

The 30 cases below are a test design, not an execution report. Replace the example rules with approved requirements before recording pass or fail. Performance budgets and supported device versions must be agreed before execution.

Selection and calendar navigation

IDCategoryTest caseExpected result
D01FunctionalSelect 2028-02-10 as both start and endOne-day range is accepted and review shows the selected date
D02FunctionalSelect 2028-03-01 through 2028-03-03Both dates persist unchanged after save and reload
D03FunctionalMove from February to March and back before choosingNavigation alone does not change the selected value
D04FunctionalOpen the picker with an existing saved dateSelected date is identified in the correct month
D05FunctionalUse the available month or year navigationDisplayed month/year and day grid stay in agreement
D06NegativeClear the required start field and submitRequired error prevents save without reusing its previous value
D07FunctionalReset the form to its initial empty stateBoth dates and range highlighting are cleared
D08UIDismiss a custom popup without selecting a new dayPrevious committed date remains and focus returns to its trigger

Calendar and range boundaries

IDCategoryTest caseExpected result
D09BoundarySelect 2028-02-01Inclusive minimum is accepted
D10BoundarySubmit 2028-01-31Date is rejected as before the allowed range
D11BoundarySelect 2028-03-31Inclusive maximum is accepted
D12BoundarySubmit 2028-04-01Date is rejected as after the allowed range
D13BoundarySelect 2028-02-29Leap day is accepted and persists as February 29
D14NegativeSubmit the impossible date 2028-02-30Invalid date is rejected without silently rolling into March
D15NegativeSubmit the non-leap date 2027-02-29 directlyServer rejects it as an invalid calendar date
D16NegativeChoose the blocked date 2028-02-15Selection or submission is refused with the unavailability reason
D17NegativeChoose February 14 through February 16Range is rejected because it crosses the blocked date
D18NegativeSet end date earlier than start dateError identifies the invalid range and save is prevented
D19FunctionalChange start date to after an already selected end dateEnd is cleared or flagged before submission; stale invalid range cannot save
D20BoundaryChange from March 31 to February in a custom month selectorNo impossible February 31 value can be committed

Locale, timezone and server validation

IDCategoryTest caseExpected result
D21CompatibilitySelect March 4 in each supported localeVisible formatting may differ; submitted value still represents 2028-03-04
D22NegativeEnter an ambiguous date in a custom text fieldIt is parsed only according to the displayed format or rejected with format guidance
D23CompatibilitySave a date in Asia/Kolkata and reopen in a supported western timezoneStored calendar date is unchanged
D24BoundaryIn a relative-today variant, cross midnight in the configured business timezoneEarliest allowed date updates according to that timezone and approved rule
D25SecurityBypass disabled cells and submit a blocked date directlyServer rejects it independently of calendar UI
D26SecuritySend malformed or excessive date text to the date endpointControlled validation error occurs without an internal error or unintended record

Accessible and responsive interaction

IDCategoryTest caseExpected result
D27UIOperate a custom calendar with keyboard alone using its documented modelUser can open, move focus, select and dismiss without a mouse
D28UIRead selected, focused and unavailable days with a screen readerFull dates and relevant states are distinguishable; colour is not the only cue
D29PerformanceOpen the calendar and change months under agreed device/network conditionsRendering and availability lookups meet the budget without stale enabled dates
D30CompatibilityRepeat limits and leap-day selection on supported native mobile and desktop pickersAccepted values agree even though picker appearance and interaction differ

Evidence and prioritisation

Prioritise D09–D18 and D23: they expose boundary, calendar and date-shift defects. Record the visible text, submitted date, stored value, locale and timezone. For native inputs, test semantic outcomes rather than demanding identical popup screenshots across browsers. The follow-up about daylight-saving time belongs to date-time scheduling; do not mix that with a date-only booking field. A custom calendar also needs the keyboard and focus review described in the WAI date-picker example.

Downloads

Quick answers

Should a date picker look identical in every browser?

No. Native pickers vary; validate the chosen date, constraints and usability on supported platforms.

Does HTML validation replace server validation?

No. Direct requests can bypass the picker and must be checked against the same business rules.

Sources

Want a project you can show in interviews?

The portfolio project kit walks you through testing a deliberately buggy app with Selenium or Playwright and API tests, then explaining it. The app itself is free.