0.11.4 • Published 4 years ago

@texada/date-picker v0.11.4

Weekly downloads
7
License
MIT
Repository
github
Last release
4 years ago

@texada/date-picker

GitHub npm (scoped) npm.io npm bundle size (minified)

Netlify Status

This project is a fork of https://github.com/quri/react-bootstrap-datetimepicker

This project is a port of https://github.com/Eonasdan/bootstrap-datetimepicker for React.js

Usage

Installation:

npm install @texada/date-picker

Then:

import DateTimeField from "@texada/date-picker";
import "@texada/date-picker/dist/styles.min.css";

...

render() {
  return <DateTimeField />;
}

See Examples for more details.

API

DateTimeField

NameTypeDefaultDescription
dateTimestringmoment().format('x')Represents the inital dateTime, this string is then parsed by moment.js
formatstring"x"Defines the format moment.js should use to parse and output the date to onChange
inputFormatstring"MM/DD/YY h:mm A"Defines the way the date is represented in the HTML input. It must be a format understanable by moment.js
onChangefunctionx => console.log(x)Callback trigger when the date changes. x is the new datetime value.
showTodaybooleantrueHighlights today's date
sizestring"md"Changes the size of the date picker input field. Sizes: "sm", "md", "lg"
daysOfWeekDisabledarray of integer[]Disables clicking on some days. Goes from 0 (Sunday) to 6 (Saturday).
viewModestring or number'days'The default view to display when the picker is shown. ('years', 'months', 'days')
inputPropsobjectundefinedDefines additional attributes for the input element of the component.
minDatemomentundefinedThe earliest date allowed for entry in the calendar view.
maxDatemomentundefinedThe latest date allowed for entry in the calendar view.
modestringundefinedAllows to selectively display only the time picker ('time') or the date picker ('date')
defaultTextstring{dateTime}Sets the initial value. Could be an empty string, or helper text.
zIndexnumber4000Defines the z-index of the modal overlay
disabledbooleanfalseDisables the date picker
hasErrorbooleanfalseMakes input box red
labelstringundefinedLabel for input
shouldValidatebooleanfalseMakes input box red and shows error message when input is invalid
requiredbooleanfalseDisplays a red "*"" on the label
hasErrorbooleanfalseMakes input box red
idstring(auto-generated)The id for the date input
0.11.2

4 years ago

0.11.3

4 years ago

0.11.4

4 years ago

0.11.2-beta

4 years ago

0.11.1

4 years ago

0.11.0

4 years ago

0.10.0

4 years ago

0.9.0

4 years ago

0.8.5-beta

4 years ago

0.8.4

5 years ago

0.8.3

5 years ago

0.8.2

5 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.1

5 years ago

0.5.1-beta

5 years ago

0.5.0

5 years ago

0.5.0-beta2

5 years ago

0.5.0-beta

5 years ago

0.4.5-alpha3

5 years ago

0.4.5-alpha2

5 years ago

0.4.5-alpha1

5 years ago

0.4.4

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago