Skip to content
Bugwise
Menu
UI Components

Date & Time Picker

Calendars, wheels and typed fields for choosing dates and times. Learn the variants, when a picker is overkill, and how locales, time zones and leap years break them.

35 min Inputs & selection iOS · Android · Web Also called: Date picker, Calendar, Time picker, Date range picker

Booking a hotel, scheduling a food delivery, setting an alarm, filtering bank transactions by month: they all need a date or a time. The control you use to choose it is a date pickerDate pickerA control for choosing a date, usually as a calendar grid or scrolling wheels.Open in glossary → (or time picker), and it is one of the most bug-prone components in any app.

Why? Because dates look simple but aren’t. Months have 28 to 31 days. Some years have a February 29th. Half the world writes 03/04 for the 3rd of April, the other half for March 4th. Clocks jump forward and back once a year. And a server in one time zoneTime zoneThe local time of a region. Bugs appear when apps mix up the user's time zone with the server's.Open in glossary → talks to phones in all the others. Each of those facts has caused real bugs in real products. Let’s learn how to find them.

What is a date picker?

A date picker is any control that lets the user choose a calendar date, and a time picker lets them choose a time of day. Many apps combine the two. They come in a few shapes:

Anatomy

Here is a Material 3 modal date picker, because it has every part. Other designs leave some out.

Select date

Tue, Oct 20

12
October 2026 3
SMTWTFS4
1234567891011121314151617181920212223242526272829303156
CancelOK7
  1. 1

    Headline (selected value)

    Shows the chosen date in words, e.g. "Tue, Oct 20". It must update with every tap.

  2. 2

    Input mode toggle

    Switches between picking on the calendar and typing the date. Material shows a pencil, iOS lets you tap the field.

  3. 3

    Month / year header + navigation

    Tap the title to jump to another year, or use the arrows to move one month.

  4. 4

    Weekday row

    Starts on Sunday or Monday depending on the locale. Labels must line up with the dates below.

  5. 5

    Today marker

    An outline (or colored text on iOS) so users know where "now" is.

  6. 6

    Selected day

    Filled circle. Past or unavailable days look disabled and cannot be picked.

  7. 7

    Actions

    Cancel / OK in modal pickers. Inline pickers apply the value immediately.

How it differs from similar input methods

There are many ways to ask for a date, and choosing the wrong one is a real usability finding.

Input methodBest forWeak atExample
Calendar gridDates close to today, where the weekday mattersDates far away (birth dates)Delivery date, appointment
Range pickerA start and an end that belong togetherSingle datesHotel stay, car rental, report period
Wheel pickerTimes; dates when the exact weekday doesn’t matterSeeing the month as a whole; speedAlarm time, reminder
Typed fieldDates users know by heart; power usersAmbiguous formats, typosCard expiry, date of birth
Three separate fieldsMemorable dates (birth, passport issue)Picking relative to todayDate of birth in a government form
DropdownsA short list of fixed optionsAnything with 31 options per field“Next 7 days” delivery slots
Dev note

Apple calls it a date picker (UIDatePicker / SwiftUI DatePicker) with styles compact, inline (graphical) and wheels. Google’s Material 3 has date pickers (docked, modal, modal input) and time pickers (dial and input). On the web there is the native <input type="date"> and countless custom calendar libraries.

Designs & variants

Every platform does it differently, and each design has its own weak spots. All eight demos below are live.

Every picker below works. Tap, scroll the wheels, type into the fields, and try the keyboard (Tab, then arrow keys inside a calendar). The simulated "today" is Monday, October 12, 2026.

October 2026

SunMonTueWedThuFriSat
Time9:41 AM

Inline calendar

iOS

The calendar is always visible inside the screen. Today is shown in blue text; the selected day gets a tinted circle. Good when the date is the main task.

Table reservation

Date

Compact (pill) picker

iOS

A small grey pill in a form row. Tapping it opens a calendar or time wheels in a popover. Past dates are disabled here.

Thursday, February 26, 2026

Wheel picker

iOS

Scrolling wheels for month, day and year. Choose February 2027: days 29–31 turn grey and the wheel snaps back to the last real day.

MM/DD/YYYY

October 2026

SMTWTFS

Docked date picker

Android · Material 3

A text field with a calendar that drops down below it. You can type (MM/DD/YYYY) or tap. Try typing 02/30/2027.

Select date

Tue, Oct 20

October 2026

SMTWTFS

Modal date picker

Android · Material 3

Opens as a dialog. The headline shows the choice; the pencil switches to typing. Nothing is saved until OK, and Cancel must throw the change away.

Select time

:
9:41 AM

Time picker (dial / input)

Android · Material 3

Pick the hour on a clock face, then the minutes. The keyboard icon switches to two text fields, which is faster and more accessible.

value sent: date=2026-10-12 time=19:30

Native date & time inputs

Web

<input type="date"> uses the browser's own picker, so it looks different in Chrome, Safari and Firefox. The display follows the browser's language, but the value is always YYYY-MM-DD.

Check-in

Fri, Oct 23

Check-out

Mon, Oct 26

October 2026

SMTWTFS

3 nights · Oct 23 – Oct 26

Date range picker

Web

Travel and hotel sites pick check-in and check-out in one calendar. Tapping a date before check-in makes it the new check-in. The night count is the difference in days.

When to use it

A calendar or wheel picker is a good choice when:

  • The date is close to today (next week’s delivery, a table reservation this weekend).
  • The weekday matters: users want to see that the 23rd is a Friday.
  • Some dates are unavailable and should be visibly blocked (sold-out nights, past dates, closed days).
  • You need a range where the user wants to see both ends together.
  • For times: the choice is one of a limited set (every 15 minutes) or a familiar clock face helps.

Good and bad uses

Memorable date: three fields

Date of birth

For example: 27 3 1991

Day

27

Month

3

Year

1991

Everyone knows their birth date. Three labeled fields are the fastest way to enter it, and nothing is ambiguous.

Calendar for a birth date

Date of birth

October 2026
123456789101112131415161718192021

Born in 1991? That's 427 taps on ‹

A calendar opens on today’s month. Reaching 1991 means hundreds of taps (or finding a hidden year view).

Typed, with the format shown

Expiry date

Format: MM/YY, as printed on your card

09/28

A card expiry date is copied from the card itself. A short field with a visible format beats any calendar.

Ambiguous format

Delivery date

03/04/2027

March 4th? Or 3 April?

No hint, no month name. An American reads March 4th, a Brit reads 3 April. Show the format, or show the month as a word.

One range picker

Check-in

Fri, Oct 23

Check-out

Mon, Oct 26

222324252627

3 nights · €360

Check-in and check-out in one calendar, the stay highlighted, and the night count spelled out.

Two unconnected pickers

Check-in

10/26/2026

Check-out

10/23/2026

Two unrelated pickers. Nothing stops check-out before check-in.

Each picker has no idea what the other one holds, so impossible ranges are easy to create.

Time with its time zone

BEG → JFK

07:40 Belgrade time

Arrives 11:05 New York time, same day

Flight times are shown in the local time of each airport and labeled. No guessing.

Silent conversion

BEG → JFK

01:40

Converted to the phone's time zone, without saying so

The departure was quietly converted to the phone’s zone. The traveler arrives at the airport six hours off.

Common bugs

Date and time bugs are so common that many teams keep a dedicated checklist for them. These are the classics:

#BugWhat you seeTypical severity
1Impossible rangeCheck-out before check-in, or an end date before the start date, is acceptedHigh
2Off-by-one count“2 nights” for a one-night stay; a 7-day report includes 8 daysHigh (wrong price)
3Impossible dates acceptedTyped 31/04 or 29/02/2027 is accepted, or silently becomes 1 May / 1 MarchMedium–High
4Day shifts by oneThe saved date is one day earlier or later than chosen, often only for users east or west of UTC, or around midnightHigh
5Wrong format for the localeA UK user sees 03/04/2026 meaning March 4th; dates are typed one way and parsed anotherHigh
6Wrong first day of weekThe week starts on Sunday for European users, or weekday labels don’t line up with the datesMedium
7Month navigation skipsFrom January 31st, “next” jumps to March because “February 31st” doesn’t existMedium
8Past or blocked dates selectableSold-out or past days look disabled but can still be tapped or typedHigh
9DST problemsA 02:30 alarm on the day clocks spring forward never rings, or a 01:30 reminder fires twice in autumnMedium–High
1012h / 24h mix-ups“12:30 AM” stored as midday, or the device’s 24-hour setting is ignoredMedium
11Leap year bugsFebruary 29th missing in 2028, or yearly renewals of Feb 29 crash in 2029Medium
12Cancel doesn’t cancelIn a modal picker, the date changes even after tapping CancelMedium

Stress-test it: locales and time zones

Most date bugs live in three places: formats, time zones and boundary dates. A little theory first, then the playground.

The same date, written four ways

The 4th of March 2026 in the short date format of four localesLocaleRegional settings that control language and formats for dates, numbers and currency.Open in glossary → (exact punctuation can vary slightly between browsers):

LocaleShort dateLong date9:30 in the evening
en-US (United States)3/4/26Wednesday, March 4, 20269:30 PM
en-GB (United Kingdom)04/03/2026Wednesday, 4 March 202621:30
de-DE (Germany)04.03.26Mittwoch, 4. März 202621:30
sr-Latn (Serbia)4. 3. 2026.sreda, 4. mart 2026.21:30

Notice that en-US and en-GB use the same digits in a different order. “03/04” is March 4th in one and April 3rd in the other. A date that is typed in one format and parsed in another is a classic, high-severity localizationLocalizationAdapting an app to a language and region, including translations, dates, currency and layout.Open in glossary → bug, because it doesn’t crash: it books the wrong day.

First day of the week

The US calendar starts on Sunday. Most of Europe, including the UK, Germany and Serbia, starts on Monday (the ISO 8601 standard). Some countries in the Middle East start on Saturday. A calendar that ignores this isn’t broken, but it feels wrong to users and causes mis-taps. A calendar where the labels and the dates don’t line up is broken.

12-hour vs 24-hour clock

The locale picks a default, but users can override it (iOS: Settings › General › Date & Time › 24-Hour Time, Android: Use 24-hour format). Test both. Watch out for 12:00 AM (midnight) and 12:00 PM (noon): they are easy to get backwards.

Time zones and daylight saving time

A time is only meaningful together with a time zone. “23:30 in Belgrade” is already the next day in Tokyo and still the same afternoon in New York. On top of that, many zones use daylight saving time (DST):

  • In spring the clocks jump forward (in the EU on the last Sunday of March, in the US on the second Sunday of March). One hour, such as 02:00–02:59, doesn’t exist that night.
  • In autumn they go back (EU: last Sunday of October, US: first Sunday of November). One hour happens twice.
  • Some zones have no DST (Tokyo, Kolkata), some are offset by half an hour (Kolkata is UTC+5:30), and in the southern hemisphere (Auckland) the seasons, and so the changes, are reversed.

Now play. Switch between en-US and en-GB and watch the short date. Set 23:30 and move the device time zone around the world. Jump to a DST day and pick the hour that doesn’t exist.

Find the bug

Time to practice. This hotel booking screen has six bugs. The simulated “today” is Monday, 12 October 2026, so the results are always the same. Explore it like a tester:

  • Pick dates in different orders, and count the nights yourself.
  • Type dates into the fields, including impossible ones.
  • Move between months, starting from different check-in dates.
  • Change the Region and Time zone in the device settings, and compare the calendar with the summary.

🐞 Bug hunt: Hotel booking

This demo has 6 hidden bugs. Explore it like a tester, then check your findings.

Found0/6
9:41

Hotel Adria

Split · 4.6 · €120/night

October 2026

MTWTFSS

Pick your check-in date.

Device settings

Simulated today: Monday, 12 October 2026

Network log

  • Tap Reserve to see the request…
  1. 1

    Hint: Tap a later date first, then an earlier one.

  2. 2

    Hint: Book a single night and read the summary.

  3. 3

    Hint: Type 31/04/2027 or 29/02/2027 into Check-in.

  4. 4

    Hint: Pick 31 October as check-in, then press the next-month arrow.

  5. 5

    Hint: Select a stay, then change the device time zone to New York (or London).

  6. 6

    Hint: Compare the weekday letters in the calendar with the weekday in the summary. Then try Region: United States.

How to test it

Checklist

Date & time picker test checklist

0 of 14 checked

Example test cases

TC-DATE-001Book a one-night stay

Preconditions

  • Today is 12 Oct 2026
  • Hotel has availability

Steps

  1. Open the hotel page
  2. Tap 20 Oct as check-in
  3. Tap 21 Oct as check-out

Test data

Price: €120 per night

Expected result

Summary shows "1 night" and a total of €120. The stay is highlighted from 20 to 21 Oct.

TC-DATE-002Choosing an earlier date after check-in does not create a reversed range

Steps

  1. Tap 20 Oct as check-in
  2. Tap 15 Oct

Expected result

15 Oct becomes the new check-in and the app waits for a check-out. Check-out is never before check-in.

TC-DATE-003Impossible typed dates are rejected

Preconditions

  • Region: United Kingdom (format DD/MM/YYYY)

Steps

  1. Type 31/04/2027 into Check-in and press Enter
  2. Type 29/02/2027 and press Enter
  3. Type 29/02/2028 and press Enter

Expected result

The first two show an error and keep the field unchanged. 29/02/2028 is accepted, because 2028 is a leap year.

TC-DATE-004Past dates cannot be selected

Preconditions

  • Today is 12 Oct 2026

Steps

  1. Tap 11 Oct in the calendar
  2. Type 11/10/2026 into Check-in

Expected result

The tap does nothing (the day looks disabled), and typing shows "Check-in can't be in the past".

TC-DATE-005Month navigation from the 31st

Steps

  1. Select 31 Oct as check-in
  2. Tap the next-month arrow
  3. Tap it again

Expected result

The calendar shows November 2026, then December 2026. No month is skipped.

TC-DATE-006Selected dates survive a time zone change

Preconditions

  • Device time zone: Europe/Belgrade

Steps

  1. Select 20 Oct to 23 Oct
  2. Change the device time zone to America/New_York
  3. Return to the app
  4. Tap Reserve

Expected result

The app still shows 20–23 Oct, and the request contains "checkIn":"2026-10-20" and "checkOut":"2026-10-23".

TC-DATE-007Date format and first day of week follow the region

Steps

  1. Set Region to United States and open the picker
  2. Note the format and first weekday
  3. Set Region to United Kingdom and repeat

Expected result

US: 10/20/2026, week starts on Sunday. UK: 20/10/2026, week starts on Monday. In both, 12 Oct appears under Monday.

TC-DATE-008Reminder on the day clocks go forward

Preconditions

  • Device time zone: Europe/Belgrade

Steps

  1. Create a reminder for 29 Mar 2026 at 02:30
  2. Save it and reopen it

Expected result

The app either warns that 02:30 does not exist that night or moves it to 03:30, and tells the user. It does not crash or silently save a different day.

TC-DATE-009Cancel keeps the previous date

Preconditions

  • A date of 20 Oct is already saved

Steps

  1. Open the modal date picker
  2. Tap 25 Oct
  3. Tap Cancel

Expected result

The field still shows 20 Oct.

Tip: click a test case to expand it.

Accessibility

Calendars are hard to use without sight or a mouse. Check these:

Mobile vs web

  • Three styles: compact (grey pills that open a popover), inline (full calendar) and wheels.
    Dev note
    UIDatePicker / SwiftUI DatePicker.
  • Modes: date, time, or date and time. Follows the device’s region, calendar and 24-hour setting automatically.
  • Wheels don’t stop you from scrolling to February 30th; they snap back. Check the app reacts to the final value, not the one in between.
  • Test with Settings › General › Language & Region (region, first day of week, calendar) and Date & Time (24-hour, time zone off “Set Automatically”).
  • Native date and time fields use the browser’s own picker. The display follows the browser language, but the value is always YYYY-MM-DD / HH:mm.
    Dev note
    <input type="date"> and <input type="time">.
  • Native date-and-time fields have no time zone. Check what the backend assumes.
    Dev note
    <input type="datetime-local">.
  • Custom calendar libraries are everywhere: check keyboard support, ARIA roles and focus handling in DevToolsDevToolsDeveloper tools built into browsers for inspecting pages, network traffic and errors.Open in glossary →.
  • Check the request in the Network tab: is the date sent as 2026-10-20 or as a timestamp like 2026-10-19T22:00:00Z? The second one is a time zone bug waiting to happen.
  • In Chrome DevTools, Sensors › Location lets you override the time zone and locale to test other regions without traveling.

Check your understanding

Quick quiz

0/5 answered · 0 correct

  1. 1.Which input is the best fit for a date of birth?

  2. 2.A UK user types 03/04/2026. The app saves March 4th. What kind of bug is this?

  3. 3.Check-in 20 Oct, check-out 21 Oct. How many nights should a hotel app show?

  4. 4.You pick 20 Oct in Belgrade, switch the device time zone to New York, and the app now shows 19 Oct. What is the most likely cause?

  5. 5.Which pair of dates is the strongest boundary test for typed date validation?

Key takeaways

  • Date pickers come as calendars, wheels, dials, typed fields and range pickers. Each fits a different job, and a calendar for a birth date is overkill.
  • The same digits mean different dates in different locales (03/04). Always show the format and test at least en-US and one European locale.
  • A calendar date is not a timestamp. Change the device time zone and use times near midnight to catch dates that shift by a day.
  • Always test the boundaries: month ends, Feb 29 in leap and non-leap years, Dec 31 → Jan 1, DST change days, 12:00 AM/PM.
  • For ranges, check order (end after start) and counts (nights = difference, not difference + 1).
  • Test both typing and picking, and check the value that actually reaches the server.

Finished this page?Nice work, this page is complete!

Mark it as done to track your progress. It's saved in this browser, no account needed.

Its review cards are now in Bites ⚡
Esc

Type to search the whole site.