Skip to content

DevChanQ/shopify-polaris-datetime-picker

Repository files navigation

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 () => {}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published