1.0.15 • Published 30 days ago

pickers-inputs v1.0.15

Weekly downloads
-
License
MIT
Repository
github
Last release
30 days ago

🚧 🚧 🚧 pickers-inputs is deprecated. Due to the lack of maintainers and increased code complexity, pickers-inputs is now deprecated in favor of react-date-time-picker-tz.

You can find the old code of pickers-inputs here.

Pickers-Inputs

React component library for handling date, time, and dateTime pickers with zone handling and customizable formats.

Installation

You can install the package via npm or yarn:

npm install pickers-inputs
# or
yarn add pickers-inputs

Usage

Import InputPicker from pickers-inputs;

import { InputPicker, TimePicker } from "pickers-inputs";

Add InputPicker like this:

<InputPicker
  type="date"
  value={selectedDate}
  onChange={(newValue) => {
    setSelectedDate(newValue);
  }}
/>

Add TimePicker like this:

<TimePicker
  value={"2024-03-30 04:06:16 PM Asia/Calcutta"}
  onChange={(v) => {
    console.log(v);
  }}
  format="yyyy-LL-dd hh:mm:ss a z"
  outputZone="Europe/Moscow"
/>

InputPickerProps

PropTypeDescription
type"date", "time", "dateTime"Select picker type.
valuestringInput value.
onChange(value: string) => voidFuction triggered when the value changes. Receives the new value as an argument.
formatstringFormat the displayed value.(Input and output format will be the same.)
onHide() => voidFuction triggered when the picker is hidden.
onShow() => voidFuction triggered when the picker is shown.
mainContainerClassNamestringClass name(s) that will be added along with "main-box" to the main picker element.
mainContainerStylesCSSPropertiesInline styles for the main container element.
selectedStyleCSSPropertiesStyles for the selected element.
outputZonestringSpecifies the output value based on the zone

Date Picker

Date Picker

Time Picker

Time Picker

Date-Time Picker

Date-Time Picker

1.0.11

1 month ago

1.0.10

1 month ago

1.0.15

30 days ago

1.0.14

30 days ago

1.0.13

30 days ago

1.0.9

1 month ago

1.0.8

1 month ago

1.0.7

1 month ago

1.0.6

1 month ago

1.0.5

1 month ago

1.0.4

1 month ago

1.0.3

1 month ago

1.0.2

1 month ago

1.0.1

1 month ago

1.0.0

1 month ago