DOCS
v0.4

Components / Date Time Picker

Date Time Picker

Composite date + time picker. Combines cg-date-picker and cg-time-picker with an ISO datetime value.

formsv0.5.0

Playground

Examples

Basic
<cg-date-time-picker label="Event start" style="max-width: 420px;"></cg-date-time-picker>
With value
<cg-date-time-picker label="Deadline" value="2026-04-06T14:30" style="max-width: 420px;"></cg-date-time-picker>
12h + 15min
<cg-date-time-picker label="Meeting" use12h step="15" style="max-width: 420px;"></cg-date-time-picker>

Import

import { CgDateTimePicker } from '@cognivo/components';
// Or tree-shake: import '@cognivo/components/cg-date-time-picker';

Per-component imports ship only that component (~8 kB gzip).

API Reference

PropTypeDefaultDescription
labelstringLabel text above the pickers
valuestringISO datetime value (YYYY-MM-DDTHH:MM)
datePlaceholderstring"Select date"Date picker placeholder
timePlaceholderstring"Select time"Time picker placeholder
helperstringHelper text below pickers
stepnumber5Minute step interval
use12hbooleanfalse12-hour format with AM/PM
size"md" | "lg""md"Size — md (48px), lg (56px)
rounded"none" | "sm" | "md" | "lg""lg"Border radius
errorbooleanfalseError state
successbooleanfalseSuccess state
disabledbooleanfalseDisabled state

Events

EventDetailDescription
cg-change{value: string, date: string, time: string}When date or time changes