Skip to content

@nepdatejs/react ​

React components and hooks. See the React guide.

EntryContains
@nepdatejs/reactComponents and everything below
@nepdatejs/react/headlessHooks only, no markup or CSS
@nepdatejs/react/serverComponents with no hooks, for Server Components

Components ​

ComponentProps
DatePickerDatePickerProps
DateRangePickerDateRangePickerProps
DateTimePickerDateTimePickerProps
MultiDatePickerMultiDatePickerProps
CalendarCalendarProps
DateTextDateTextProps
ShortDatevalue, fallback, className
CalendarBodybindings, className, theme. The calendar part alone, with the ndp-* classes
TimeColumnsThe hour and minute columns alone
Iconname: an IconName. The icons the components use

Functions ​

FunctionReturns
shortDate(value)"10 Ashwin 2083", with the time if the value has one
bothDates(value)"10 Ashwin 2083 (26 Sep 2026)"

Hooks ​

HookOptionsReturns
useCalendarCalendar optionsCalendarBindings and store
useDatePickerPicker options and idDatePickerBindings
useDateRangePickerPicker optionsDateRangePickerBindings
useDateTimePickerPicker options and idDateTimePickerBindings
useMultiDatePickerPicker options and idMultiDatePickerBindings
useCalendarBindingsState, actions, locale, optionsCalendarBindings, for a custom store
useStoreFactory, options{ store, state }, for wrapping any store
deepEqualTwo valuesCompares by content, as useStore does

See Headless React hooks.

CalendarBindings ​

MemberContents
state, actionsThe calendar's state and actions
focusGrid()Move focus to the current day
getGridProps()For the <table>. Type: GridProps
getDayProps(cell)For a day button. Type: ButtonProps

Types ​

DatePickerProps, DateRangePickerProps, DateTimePickerProps, MultiDatePickerProps, CalendarProps, DateTextProps, IconName, DatePickerBindings, DateRangePickerBindings, DateTimePickerBindings, MultiDatePickerBindings, CalendarBindings, InputProps, PanelProps, ButtonProps, GridProps.

Released under the MIT licence.