npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@commercetools-uikit/date-time-input

v20.4.0

Published

The `DateTimeInput` component allows the user to select a date. This component also supports multiple date selection.

Downloads

10,512

Readme

DateTimeInput

Description

The DateTimeInput component allows the user to select a date. This component also supports multiple date selection.

It formats the selected date depending on the current locale.

Installation

yarn add @commercetools-uikit/date-time-input
npm --save install @commercetools-uikit/date-time-input

Additionally install the peer dependencies (if not present)

yarn add moment react react-intl
npm --save install moment react react-intl

Usage

import DateTimeInput from '@commercetools-uikit/date-time-input';

const Example = () => (
  <DateTimeInput
    placeholder="Select a date..."
    timeZone="Europe/Berlin"
    value="2018-10-04T09:00:00.000Z"
    onChange={() => {}}
  />
);

export default Example;

Properties

| Props | Type | Required | Default | Description | | ------------------------- | -------------------------------------------------------------------------------------------- | :------: | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | aria-invalid | boolean | | | Indicate if the value entered in the input is invalid. | | aria-errormessage | string | | | HTML ID of an element containing an error message related to the input. | | horizontalConstraint | unionPossible values:, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto' | | | Horizontal size limit of the input field. | | value | string | ✅ | | The selected date, must either be an empty string or a date formatted in ISO 8601 (e.g. "2018-10-04T09:00:00.000Z"). | | onChange | FunctionSee signature. | | | Called when the date changes. Called with an event containing an empty string (no value) or a string in this format: "YYYY-MM-DD". | | onFocus | FocusEventHandler | | | Called when the date input gains focus. | | onBlur | FunctionSee signature. | | | Called when the date input loses focus. | | timeZone | string | ✅ | | Specifies the time zone in which the calendar and selected values are shown. It also influences how entered dates and times are parsed. Get list of timezone with moment.tz.names() See moment docs | | id | string | | | Used as the HTML id attribute. | | name | string | | | Used as the HTML name attribute. | | placeholder | string | | | Placeholder value to show in the input field | | isCondensed | boolean | | | Use this property to reduce the paddings of the component for a ui compact variant | | isDisabled | boolean | | | Disables the date picker | | isReadOnly | boolean | | | Disables the date picker menu and sets the input field as read-only | | hasError | boolean | | | Indicates the input field has an error | | hasWarning | boolean | | | Indicates the input field has a warning | | defaultDaySelectionTime | string | | | The time that will be used by default when a user selects a calendar day. It must follow the “HH:mm” pattern (eg: 04:30, 13:25, 23:59) |

Signatures

Signature onChange

(event: TCustomEvent) => void

Signature onBlur

(event: TCustomEvent) => void

props.timeZone

The timeZone specifies which time zone the calendar uses, which time zone the selected value is shown in and which time zone entered dates and times are parsed in. For example, given the value is 2018-10-18T00:00:00.000Z and thetimeZoneis set toEurope/Berlin, then entering "13:00" as the time results in theonChangebeing called with2018-10-15T11:00:00.000Z (as the time zone offset for that date is two hours).