v2.2.1 — automatic styles

A date picker
you actually enjoy
typing into

A React DatePicker with input masking. Controlled and uncontrolled, ranges, time, any date-fns locale. Zero overhead when react-hook-form isn’t needed.

  • • ~34 KB brotli
  • • TypeScript built-in
  • • MIT
Input maskformat="dd.MM.yyyy"
dd.MM.yyyy

Type straight through — separators are inserted for you. Backspace skips them, validity is checked round-trip.

onChange value
null
~34 KB
brotli, whole package
0
runtime deps besides date-fns
3
formats: ESM · CJS · .d.ts
2
props for any format
react-hook-form

In a real form

Through daterly/rhf — type-safe name, validation, defaultValues and control from useForm.

Birthday
Vacation
onSubmit value
// Fill in the form and click Submit
tsxcode example
import { useForm, FormProvider } from 'react-hook-form'
import {
  RHFDatePicker,
  RHFDateRangePicker,
} from 'daterly/rhf'

const methods = useForm()

<FormProvider {...methods}>
  <form onSubmit={methods.handleSubmit(onSubmit)}>
    <input {...methods.register('name')} />

    <RHFDatePicker
      name="birthday"
      label="Дата рождения"
    />

    <RHFDateRangePicker
      name="vacation"
      label="Отпуск"
    />
  </form>
</FormProvider>

Everything you want from a date picker

Locales

Any language via a prop

  • ru12 мая 2026
  • enMay 12, 2026
  • de12. Mai 2026
Range + time

Two-step click, optional TimePanel

12.05.2026 09:3019.05.2026 18:00
Control

Controlled and uncontrolled

<DatePicker
  value={d}
  onChange={setD}
/>

Minimal API

Two props cover 90% of cases. The rest is opt-in.

valueDate | nullControlled value
onChange(d: Date|null) => voidChange callback
formatstringdate-fns mask, e.g. dd.MM.yyyy
localeLocaledate-fns locale
rangebooleanTwo-step range selection
showTimebooleanEnable the TimePanel

Ready to install?

Styles load automatically. Recipes, API and examples for RHF, Zod, Joi and shadcn/ui — in the docs.

Open the docs →