kraf / react-datetimepicker

Basic React datetimepicker component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

Simple datetimepicker for use with React.js. The only dependencies are moment and React. The styling is minimal and you will most likely have to customize it.

Changes

  • 2.0.0
    • Breaking: switched to managed values

Usage

npm install react-datetimepicker

var DateTimePicker = require("react-datetimepicker");

API

Properties with defaults (all optional)

weekStart=1 // 0 -> Sun, 1 -> Mon, 2 -> Tue, 3 -> Wed, 4 -> Thu, 5 -> Fri, 6 -> Sat
time=true // show/hide time picker part
inputMode=true // render input or inline datepicker
dateFormat='YYYY-MM-DD' // used for input when time is set to false
dateValidator=undefined // bool function(date) - return false to disable selection of particular date
dateTimeFormat='YYYY-MM-DD HH:mm' // used for input when time is set to true
value=(new Date()) // 
onChange=undefined // Gets invoked when selection changes

About

Basic React datetimepicker component


Languages

Language:JavaScript 94.0%Language:CSS 4.2%Language:HTML 1.0%Language:Makefile 0.8%