shopify-polaris-datetime-picker

0.1.1 • Public • Published

Shopify Polaris DateTime Picker

Installation

# NPM
npm i shopify-polaris-datetime-picker

# Yarn
yarn add shopify-polaris-datetime-picker

Usage

  1. Import the component
// es6
import DateTimePicker from "shopify-polaris-datetime-picker";

//es5
const DateTimePicker = require("shopify-polaris-datetime-picker");
  1. Use it
const SomeComponent = () => {
  // ...
  return (
    // ...
    <DateTimePicker {...props} />
  );
};

Props

Prop Name Type Description Required Default
initialValue Number UNIX timestamp in milliseconds false Date.now()
dateLabel String Label of date input false "Date"
timeLabel String Label of time input false "Time"
onChange Function Called when datetime is changed
Returns Date object of new datetime
false () => {}

Package Sidebar

Install

npm i shopify-polaris-datetime-picker

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

209 kB

Total Files

8

Last publish

Collaborators

  • devjeff