`react-time-picker` is a React component that provides an intuitive interface for users to select a specific time. It is actively maintained, with the current stable version being 8.0.3, released recently with improvements like OIDC trusted publishing and immutable releases. The library generally follows a stable release cadence, with major versions addressing significant breaking changes or new React features, and minor/patch versions focusing on bug fixes and enhancements. Key differentiators include its focus on accessibility, ease of integration into existing React projects, and reliance on native browser datetime capabilities where appropriate, while offering extensive customization for internationalization and display formats. It provides a clean, unopinionated UI that integrates well into various design systems, offering flexibility without enforcing a specific look and feel, and ships with TypeScript types for improved developer experience.
npm install react-time-pickerVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of `TimePicker` component, including state management for the selected time, configuring display format, and importing necessary CSS for styling.
Ensure your project, bundler (e.g., Webpack, Rollup), and test runner (e.g., Jest) are configured to handle ES Modules. For Jest, consider migrating to Vitest or configuring Jest's experimental ESM support.
Update your Babel configuration to use the new JSX transform. Follow the official React documentation on 'Introducing the New JSX Transform' for detailed instructions.
Migrate your component type checking to TypeScript or an alternative runtime type validation library.
Configure Jest to transpile ES Modules, use `jest-esm-transformer`, or consider migrating your testing setup to an ESM-first runner like Vitest.
Update `react-time-picker` to version 8.0.3 or newer, as this bug was fixed in that release.
Configure Jest to process ES modules (e.g., via `babel-jest` with appropriate presets and plugins, or `jest-esm-transformer`), or migrate your test suite to a test runner like Vitest which natively supports ESM.
Update `react-time-picker` to version 6.5.0 or newer, where this SSR compatibility issue was resolved.
Update `react-time-picker` to version 6.5.1 or newer, which contains a fix for this SSR-related prop type validation issue.