Docs
Inputs

Date StripNew

A week of dates in a row from the user's calendar: the red pill flows to the day you tap, and swiping pages by week.

$npx swiftpieces add DateStrip
Free · MIT + Commons ClauseiOS 17.0+datecalendarweekpickerbookinghaptics
Type
DateStrip
Files
DateStrip.swift
Depends on
Nothing (Apple frameworks only)
Version
1.0.0

Colors and metrics for DateStrip. .standard is the house palette: the brand red with ink on it.

Notes

  • A week of days in a row, built from the environment's calendar, so the first weekday, the weekday names and the month follow the user's locale. Pass bounds like DatePicker: today... for bookings or a closed range for a window. Days outside dim and cannot be picked.
  • The selected day is a red pill. Within a week it flows to the day you tap: the edge facing the new day leads on a tight spring and the far edge follows on a looser one, so it stretches across and gathers in.
  • Picking a day in another week buds the pill in place on the new day, from a small dot of red to the full pill. It never travels in from a day that is off screen, so it can't streak across the strip.
  • Swipe to page by week. The next week slides in under the finger and a long or quick swipe turns it, with a light haptic. At the first or last week in bounds the swipe meets a soft edge instead. The pill rides along with its own week.
  • The header names the month and the selected date. Today keeps a dot.
  • One selection haptic fires per pick. VoiceOver reads each day by its full date, marks today and the selection, and a three-finger swipe pages the weeks. The layout mirrors in right-to-left languages. .disabled(true) dims the strip.
  • Under Reduce Motion the pill slides whole within a week and fades into a new one.
  • Pairs with Time Slot Picker under it for a booking step.

Usage

DateStripExample()

Install

Pick one. Run it from the folder that contains your .xcodeproj and the files land inside your app.

Terminal

$npx swiftpieces add DateStrip

Or ask your coding agent · Claude Code, Cursor or Xcode, once the MCP server is connected

>Add the SwiftPieces "Date Strip" piece to my app

Or copy the source above into your app.

New to SwiftUI?If you know React, CSS or Tailwind, SwiftUI is easier to pick up than it looks.Try real app patterns first

Building a whole app? See SwiftPieces Pro →

All inputs and forms →

Build it yourself: SwiftUI haptics guide

On this page

SwiftPiecesPro

Build the whole app with one library.

Production-ready screens, whole flows, complete app templates, a Build Kit your agent follows and Pro remixing.

54 screens · 46 patterns · 48 flows · 12 templates · 31 Build Kit skills

Explore Pro