Free
Pro

Datepicker

Ply datepicker (Pro) is an input that opens a calendar overlay. Bind a Date with ngModel. showTime adds a clock step in the same popup. The trigger uses aria-haspopup="grid" because the popup is a month grid, not a dialog. date-range-picker is the start/end sibling.

When to use

  • Forms that need a compact date field instead of an always-visible month.
  • Datetime in one control — set showTime (and hourCycle) on datepicker.

When not to use

  • An inline month that should stay on the page — use calendar (free).
  • Time of day only — use time-picker.

Install with npx ply-ui-cli add datepicker.

Pro

Pro — licensed

Datepicker — part of Ply Pro

Unlock it plus 90 pro blocks, widgets & layouts — $99 one-time. Lifetime updates, 14-day money-back guarantee.

Unlock Pro

For an inline month grid without an input, use calendar. For time only, use time-picker.

Date field

An input that opens a calendar overlay. The popup is a grid, so the trigger uses aria-haspopup="grid".

Current Value: None

Date and time

Set showTime for a two-step flow: pick a date, choose a time, then apply — binding a full Date with hours and minutes.

Playground

Hour cycle

HTML

<ply-datepicker
  showTime
  hourCycle="24"
  [(ngModel)]="when">
</ply-datepicker>

Date range picker

An input-based range picker for start and end dates. Install date-range-picker (Pro).

Selected: ... → ...

Keyboard & accessibility

Role
Combobox that opens a calendar grid. The popup is not a dialog.
Focus
Focus moves into the grid when the overlay opens and returns to the field on close.

Shortcuts

  • EnterSpaceOpen the calendar grid
  • Arrow keysMove the focused day
  • EnterSelect the focused day
  • EscClose the overlay

Site-wide VPAT-style notes live on the accessibility report.

Installation

Run the following command to add this component to your project:

bash

npx ply-ui-cli add datepicker

API Reference

For AI agents

Copy a prompt with the registry name, CLI install, and import — or add the Ply MCP server.

bash

npx -y ply-ui-mcp

Ply provides standalone components. Import the exact elements you want to use into your component.

typescript (Example)

// Install: npx ply-ui-cli add datepicker
// Paths are relative to aliases.components (default: src/app/components)
import { DatepickerOverlayComponent } from './datepicker/datepicker-overlay.component';
import { DatepickerComponent } from './datepicker/datepicker.component';

@Component({
  selector: 'app-your-component',
  imports: [
    DatepickerComponent,
    DatepickerOverlayComponent
  ],
  template: `...`
})
export class YourComponent {}

API for datepicker — generated from JSDoc in the library source.

API reference for datepicker
APIMemberTypeDefaultDescription
ply-datepickerplaceholderunknown'Select date'The placeholder text shown when no date is selected.
ply-datepickerlabelstring''An optional label text displayed above the input.
ply-datepickerdisabledbooleanfalseWhether the control is disabled (consumer-facing input).
ply-datepickershowTimebooleanfalseTwo-step date + time flow: pick a date, then choose a time in the same dropdown. The field binds a full datetime.
ply-datepickerhourCycleTimePickerHourCycle'24'Clock cycle used when `showTime` is true.
ply-datepicker-overlaypanelIdstring''Calendar panel id for aria-controls.
ply-datepicker-overlayshowTimebooleanfalseShows the two-step date + time flow.
ply-datepicker-overlayhourCycleTimePickerHourCycle'24'Clock cycle forwarded to the time picker.
ply-datepicker-overlay(applied)DateEmits when applied occurs.