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.
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:
- Calendar grid: a month view where you tap a day. The most common shape on every platform.
- Wheels: spinning columns for month, day and year (or hour and minute). The classic iOS look.
- Clock dial: tap the hour on a clock face, then the minutes (Android).
- Typed input: a text fieldText fieldAn input where the user types text, like a name, email, password or search query.Open in glossary → with a format such as
DD/MM/YYYY, often with a calendar button next to it. - Range picker: one calendar for a start and end date, such as check-in and check-out on a hotel site.
Anatomy
Here is a Material 3 modal date picker, because it has every part. Other designs leave some out.
Select date
Tue, Oct 20
- 1
Headline (selected value)
Shows the chosen date in words, e.g. "Tue, Oct 20". It must update with every tap.
- 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
Month / year header + navigation
Tap the title to jump to another year, or use the arrows to move one month.
- 4
Weekday row
Starts on Sunday or Monday depending on the locale. Labels must line up with the dates below.
- 5
Today marker
An outline (or colored text on iOS) so users know where "now" is.
- 6
Selected day
Filled circle. Past or unavailable days look disabled and cannot be picked.
- 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 method | Best for | Weak at | Example |
|---|---|---|---|
| Calendar grid | Dates close to today, where the weekday matters | Dates far away (birth dates) | Delivery date, appointment |
| Range picker | A start and an end that belong together | Single dates | Hotel stay, car rental, report period |
| Wheel picker | Times; dates when the exact weekday doesn’t matter | Seeing the month as a whole; speed | Alarm time, reminder |
| Typed field | Dates users know by heart; power users | Ambiguous formats, typos | Card expiry, date of birth |
| Three separate fields | Memorable dates (birth, passport issue) | Picking relative to today | Date of birth in a government form |
| Dropdowns | A short list of fixed options | Anything 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
Inline calendar
iOSThe 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
Compact (pill) picker
iOSA 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
iOSScrolling 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
Docked date picker
Android · Material 3A 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
Modal date picker
Android · Material 3Opens 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
Time picker (dial / input)
Android · Material 3Pick 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
3 nights · Oct 23 – Oct 26
Date range picker
WebTravel 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
Month
Year
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
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
A card expiry date is copied from the card itself. A short field with a visible format beats any calendar.
Ambiguous format
Delivery date
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
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
Check-out
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
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
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:
| # | Bug | What you see | Typical severity |
|---|---|---|---|
| 1 | Impossible range | Check-out before check-in, or an end date before the start date, is accepted | High |
| 2 | Off-by-one count | “2 nights” for a one-night stay; a 7-day report includes 8 days | High (wrong price) |
| 3 | Impossible dates accepted | Typed 31/04 or 29/02/2027 is accepted, or silently becomes 1 May / 1 March | Medium–High |
| 4 | Day shifts by one | The saved date is one day earlier or later than chosen, often only for users east or west of UTC, or around midnight | High |
| 5 | Wrong format for the locale | A UK user sees 03/04/2026 meaning March 4th; dates are typed one way and parsed another | High |
| 6 | Wrong first day of week | The week starts on Sunday for European users, or weekday labels don’t line up with the dates | Medium |
| 7 | Month navigation skips | From January 31st, “next” jumps to March because “February 31st” doesn’t exist | Medium |
| 8 | Past or blocked dates selectable | Sold-out or past days look disabled but can still be tapped or typed | High |
| 9 | DST problems | A 02:30 alarm on the day clocks spring forward never rings, or a 01:30 reminder fires twice in autumn | Medium–High |
| 10 | 12h / 24h mix-ups | “12:30 AM” stored as midday, or the device’s 24-hour setting is ignored | Medium |
| 11 | Leap year bugs | February 29th missing in 2028, or yearly renewals of Feb 29 crash in 2029 | Medium |
| 12 | Cancel doesn’t cancel | In a modal picker, the date changes even after tapping Cancel | Medium |
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):
| Locale | Short date | Long date | 9:30 in the evening |
|---|---|---|---|
| en-US (United States) | 3/4/26 | Wednesday, March 4, 2026 | 9:30 PM |
| en-GB (United Kingdom) | 04/03/2026 | Wednesday, 4 March 2026 | 21:30 |
| de-DE (Germany) | 04.03.26 | Mittwoch, 4. März 2026 | 21: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.
Hotel Adria
Split · 4.6 · €120/night
October 2026
Pick your check-in date.
Device settings
Simulated today: Monday, 12 October 2026
Network log
- Tap Reserve to see the request…
- 1
Hint: Tap a later date first, then an earlier one.
- 2
Hint: Book a single night and read the summary.
- 3
Hint: Type 31/04/2027 or 29/02/2027 into Check-in.
- 4
Hint: Pick 31 October as check-in, then press the next-month arrow.
- 5
Hint: Select a stay, then change the device time zone to New York (or London).
- 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 staypositivehigh
Preconditions
- Today is 12 Oct 2026
- Hotel has availability
Steps
- Open the hotel page
- Tap 20 Oct as check-in
- 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 rangenegativehigh
Steps
- Tap 20 Oct as check-in
- 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 rejectednegativehigh
Preconditions
- Region: United Kingdom (format DD/MM/YYYY)
Steps
- Type 31/04/2027 into Check-in and press Enter
- Type 29/02/2027 and press Enter
- 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 selectednegativehigh
Preconditions
- Today is 12 Oct 2026
Steps
- Tap 11 Oct in the calendar
- 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 31stedgemedium
Steps
- Select 31 Oct as check-in
- Tap the next-month arrow
- 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 changeedgehigh
Preconditions
- Device time zone: Europe/Belgrade
Steps
- Select 20 Oct to 23 Oct
- Change the device time zone to America/New_York
- Return to the app
- 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 regionpositivemedium
Steps
- Set Region to United States and open the picker
- Note the format and first weekday
- 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 forwardedgemedium
Preconditions
- Device time zone: Europe/Belgrade
Steps
- Create a reminder for 29 Mar 2026 at 02:30
- 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 datenegativemedium
Preconditions
- A date of 20 Oct is already saved
Steps
- Open the modal date picker
- Tap 25 Oct
- 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:
- Every day has a full name. A screen readerScreen readerSoftware that reads the screen aloud for blind and low-vision users, like VoiceOver or TalkBack.Open in glossary → should say “Tuesday, 20 October 2026”, not just “20”. Today and the selected state must be announced too (“today”, “selected”).
- Keyboard (web): a calendar grid should support the arrow keys (day and week), Home/End (start and end of the week) and Page Up/Page Down (month). Try it in the gallery and playground above.
- Typing must always be possible. Some users can’t operate wheels or tiny day cells. WCAG 2.2 asks for a single-pointer alternative to dragging movements (2.5.7), and a text input is the easiest alternative of all. Don’t make a text field read-only just because there is a calendar button.
- Show the format in a visible label or hint (
DD/MM/YYYY), not only as a placeholderPlaceholderHint text shown inside an empty input field that disappears when the user starts typing.Open in glossary → that disappears while typing. - Errors in words: “April has only 30 days” beats a red border alone (don’t rely on color).
- Disabled days must look disabled for more than color (for example a strikethrough) and be announced as unavailable.
- Modal pickers must move focus into the dialog, keep it there (focus trapFocus trapKeeping keyboard focus inside an open modal so users can't tab into the hidden page behind it.Open in glossary →), and return it to the field when closed.
- Touch targetsTouch targetThe area of the screen that responds to a tap, which should be large enough for a finger.Open in glossary →: day cells on small phones are often below 44×44 pt (iOS) / 48×48 dp (Android). Check them.
- Autofill: browsers and password managers should be able to fill birth date fields.
Dev note
Birth date fields should useautocomplete="bday"(orbday-day,bday-month,bday-year).
Mobile vs web
- Three styles: compact (grey pills that open a popover), inline (full calendar) and wheels.
Dev note
UIDatePicker/ SwiftUIDatePicker. - 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”).
- Material 3: docked, modal and modal input date pickers, a date range picker (usually full screen), and a time picker with dial and keyboard input modes.
- Modal pickers have Cancel/OK. Test that Cancel really cancels and that rotating the device keeps the draft selection.
- Respects Use 24-hour format and the system language, but custom pickers in apps often forget to.
- On an emulatorEmulatorSoftware that imitates a real device's hardware and OS on your computer, like the Android Emulator.Open in glossary → you can change the time zone and date in Settings to jump straight to DST days or a leap day.
- 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-20or as a timestamp like2026-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.Which input is the best fit for a date of birth?
2.A UK user types 03/04/2026. The app saves March 4th. What kind of bug is this?
3.Check-in 20 Oct, check-out 21 Oct. How many nights should a hotel app show?
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.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 ⚡