Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-multi-date-picker

Package Overview
Dependencies
Maintainers
1
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-multi-date-picker

a simple React datepicker component for work with gregorian, persian, arabic and indian calendars

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

DatePicker

DatePicker

Layouts

Layouts

Plugins

Plugins

Installation

npm install --save react-multi-date-picker

Demo

https://shahabyazdi.github.io/react-multi-date-picker

Usage

import React from "react";
import DatePicker from "react-multi-date-picker";

export default function Example() {
  return <DatePicker />;
}

Browser (none react-app)

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>React Multi Date Picker</title>
  </head>
  <body>
    <span>Calendar Example :</span>
    <div id="calendar"></div>

    <span>DatePicker Example :</span>
    <div id="datePicker"></div>

    <span>Plugins Example :</span>
    <div id="datePickerWithPlugin"></div>

    <!-- Ract -->
    <script src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
    <script src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>

    <!-- DateObject -->
    <script src="https://cdn.jsdelivr.net/npm/date-object@latest/dist/date-object.min.js"></script>

    <!-- ReactMultiDatePicker -->
    <script src="https://cdn.jsdelivr.net/npm/react-multi-date-picker@latest/build/browser.min.js"></script>

    <!-- Optional Plugins -->
    <script src="https://cdn.jsdelivr.net/npm/react-multi-date-picker@latest/build/browser_plugins.min.js"></script>

    <script>
      const { DatePicker, Calendar } = ReactMultiDatePicker;

      const { DatePickerHeader } = ReactMultiDatePickerPlugins;

      ReactDOM.render(
        React.createElement(Calendar),
        document.getElementById("calendar")
      );

      ReactDOM.render(
        React.createElement(DatePicker),
        document.getElementById("datePicker")
      );

      ReactDOM.render(
        React.createElement(DatePicker, {
          plugins: [React.createElement(DatePickerHeader)],
        }),
        document.getElementById("datePickerWithPlugin")
      );
    </script>
  </body>
</html>

Availble props

NameTypeDefaultAvailability (DatePicker/ Calendar)
valueDate, DateObject, String, Number or Arraynew Date()both
multipleBooleanfalse (true if value is Array)both
rangeBooleanfalseboth
timePickerBooleanfalseboth
onlyTimePickerBooleanfalseboth
onlyMonthPickerBooleanfalseboth
onlyYearPickerBooleanfalseboth
formatStringYYYY/MM/DDboth
formattingIgnoreListArrayundefinedboth
localStringenboth
calendarStringgregorianboth
mapDaysFunctionundefinedboth
onChangeFunctionundefinedboth
classNameString""both
weekDaysArrayundefinedboth
monthsArrayundefinedboth
showOtherDaysBooleanfalseboth
minDateDate, DateObject, String or Numberundefinedboth
maxDateDate, DateObject, String or Numberundefinedboth
disableYearPickerBooleanfalseboth
disableMonthPickerBooleanfalseboth
zIndexNumber100both
pluginsArray[]both
arrowBooleantrueDatePicker
animationBooleanfalseDatePicker
inputClassString""DatePicker
nameStringundefinedDatePicker
idStringundefinedDatePicker
titleStringundefinedDatePicker
placeholderStringundefinedDatePicker
styleObject{}DatePicker
typeStringinputDatePicker
renderReact.Component or FunctionundefinedDatePicker
disabledBooleanfalseDatePicker
inputModeStringundefinedDatePicker
scrollSensitiveBooleantrueDatePicker
hideOnScrollBooleanfalseDatePicker
calendarPositionStringautoDatePicker
containerStyleObjectundefinedDatePicker
containerClassNameStringundefinedDatePicker
editableBooleantrueDatePicker
onlyShowInRangeDatesBooleantrueDatePicker
onOpenFunctionundefinedDatePicker
onCloseFunctionundefinedDatePicker

Calendars and Locals

CalendarsLocals
gregorian (default)en (default)
persianfa
arabicar
indianhi

Types

DatePicker Types
input (default)input-iconiconbuttoncustom
-

Keywords

FAQs

Package last updated on 04 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc