docs/components/input/DateInput

DateInput

Date and time picker input.

import { DateInput } from '@ybouhjira/hyperkit';

#Playground

Edit the code — the preview recompiles and re-renders as you type.

Live playground
Loading preview…

#More Examples

With Label

<DateInput label="Select Date" />

With Default Value

<DateInput label="Birth Date" defaultValue="1990-01-15" />

#Props

PropTypeDefaultDescription
valuestringControlled date value in ISO format.
defaultValuestringInitial date value for uncontrolled mode.
onChange(value: string) => voidCallback when date changes.
minstringMinimum selectable date in ISO format.
maxstringMaximum selectable date in ISO format.
labelstringLabel text displayed above the input.
placeholderstring'Select date'Placeholder text.
disabledbooleanfalseDisable the date picker.
requiredbooleanfalseMark the field as required.
includeTimebooleanfalseInclude time selection (datetime-local input).
size'sm' | 'md' | 'lg''md'Size preset.
classstringAdditional CSS classes.
styleJSX.CSSPropertiesCustom styles.
unstyledbooleanfalseRemove all default styling classes.

#Design Tokens

This component reads the following CSS custom properties. Override them globally or per-instance to restyle it — see the CSS Variables guide.

  • --sk-accent
  • --sk-bg-secondary
  • --sk-bg-tertiary
  • --sk-border
  • --sk-date-input-bg
  • --sk-date-input-border
  • --sk-date-input-disabled-bg
  • --sk-date-input-disabled-text
  • --sk-date-input-focus
  • --sk-date-input-placeholder
  • --sk-date-input-radius
  • --sk-date-input-text
  • --sk-error
  • --sk-focus-color
  • --sk-font-size-lg
  • --sk-font-size-md
  • --sk-font-size-sm
  • --sk-radius-md
  • --sk-text-disabled
  • --sk-text-primary
  • --sk-text-secondary
  • --sk-text-tertiary