0.1.104 • Published 10 months ago

react-date-picker-janouy v0.1.104

Weekly downloads
-
License
-
Repository
github
Last release
10 months ago

React simple date picker

Description

react-test-janouy is a simple React component that allows you to add a calendar date picker to your React application.

Table of contents

Main features

  • ☀️ Select days
  • 🌎 Localizable into many language
  • 📄 Easy to integrate

Installation

To install react-date-picker-janouy in your project, you can use NPM:

npm i react-date-picker-janouy

NodeJS JavaScript CSS3 HTML5 React

Technologies & dependencies

  • JS
  • CSS
  • React
  • date-fns

Usage

To use Calendar in your React project, you need to import it into your component and use it as a regular React component. Here's an example:

import DatePicker from "react-date-picker-janouy/dist/components/DatePicker";
import { useState } from "react";

function MyComponent() {
    const language = "en";
    const selectedDateFormat = "MM.dd.yyyy";
    const inputStyle = { width: 197, height: 25, fontSize: 13 };
    const [date, setDate] = useState();
    const [isCalendarOpen, setIsCalendarOpen] = useState(false);
    const ariaLabelName = "dateInput";
    const showCalendar = () => {
        setIsCalendarOpen(true);
    };
    const minAgeRequired=18;

  return (
    <div>
       <DatePicker
          isCalendarOpen={isCalendarOpen}
          setIsCalendarOpen={setIsCalendarOpen}
          selectedDate={date}
          setSelectedDate={(date) => setDate(date)}
          language={language}
          selectedDateFormat={selectedDateFormat}
          inputStyle={inputStyle}
          ariaLabelName={ariaLabelName}
          minAgeRequired={minAgeRequired}
      />
	</div>
  );
}

Customizable properties

The following properties can be used to customize the EasyModale component:

  • isCalendarOpen* (boolean): Determines whether the calendar is currently open or not.

  • setIsCalendarOpen* (function): A function that changes the calendarOpen state.

  • selectedDate* (string): A string that represents the date on which the user clicked.

  • setSelectedDate* (function): A function that changes selectedDate's value.

  • language (string): Determinates the calendar's language. (default: 'en'). Click [Here to see supported languages.

  • selectedDateFormat (string): Determinates the selectedDate's format. (default: 'MM.dd.yyyy').

  • inputStyle (object) : Set the input apparence. (default: { width: 100, height: 14, fontSize: 12 };).

  • ariaLabelName (string): If you want to add a personal 'name' && 'aria-label' to your input. (default: dateInput).

  • minAgeRequired (number): For a date of birth, you can add an age of majority. Later dates will be disabled. (default: null).

*required

Supported languages:

  • ar - Arabic
  • az - Azerbaijanian (Azeri)
  • bg - Bulgarian
  • bs - Bosanski
  • ca - Català
  • ch - Simplified Chinese
  • cs - Čeština
  • da - Dansk
  • de - German
  • el - Ελληνικά
  • en - English
  • en-GB - English (British)
  • es - Spanish
  • et - "Eesti"
  • eu - Euskara
  • fa - Persian
  • fi - Finnish (Suomi)
  • fr - French
  • gl - Galego
  • he - Hebrew (עברית)
  • hr - Hrvatski
  • hu - Hungarian
  • id - Indonesian
  • it - Italian
  • ja - Japanese
  • ko - Korean (한국어)
  • kr - Korean
  • lt - Lithuanian (lietuvių)
  • lv - Latvian (Latviešu)
  • mk - Macedonian (Македонски)
  • mn - Mongolian (Монгол)
  • nl - Dutch
  • no - Norwegian
  • pl - Polish
  • pt - Portuguese
  • pt-BR - Português(Brasil)
  • ro - Romanian
  • ru - Russian
  • se - Swedish
  • sk - Slovenčina
  • sl - Slovenščina
  • sq - Albanian (Shqip)
  • sr - Serbian Cyrillic (Српски)
  • sr-YU - Serbian (Srpski)
  • sv - Svenska
  • th - Thai
  • tr - Turkish
  • uk - Ukrainian
  • vi - Vietnamese
  • zh - Simplified Chinese (简体中文)
  • zh-TW - Traditional Chinese (繁體中文)
0.1.104

10 months ago

0.1.103

10 months ago

0.1.102

10 months ago

0.1.101

10 months ago

0.1.100

10 months ago

0.1.99

10 months ago

0.1.98

10 months ago

0.1.97

10 months ago

0.1.96

10 months ago

0.1.95

10 months ago

0.1.94

10 months ago

0.1.93

10 months ago

0.1.92

10 months ago

0.1.91

10 months ago

0.1.90

10 months ago

0.1.89

10 months ago

0.1.88

10 months ago

0.1.87

10 months ago

0.1.86

10 months ago

0.1.85

10 months ago

0.1.84

10 months ago

0.1.83

10 months ago

0.1.82

11 months ago

0.1.81

11 months ago

0.1.80

11 months ago

0.1.79

11 months ago

0.1.78

11 months ago

0.1.77

11 months ago

0.1.76

11 months ago

0.1.75

11 months ago

0.1.74

11 months ago

0.1.73

11 months ago

0.1.72

11 months ago

0.1.71

11 months ago

0.1.70

11 months ago

0.1.69

11 months ago

0.1.68

11 months ago

0.1.67

11 months ago

0.1.66

11 months ago

0.1.65

11 months ago

0.1.64

11 months ago

0.1.63

11 months ago

0.1.62

11 months ago

0.1.61

11 months ago

0.1.60

11 months ago

0.1.59

11 months ago

0.1.58

11 months ago

0.1.57

11 months ago

0.1.56

11 months ago

0.1.55

11 months ago

0.1.54

11 months ago

0.1.53

11 months ago

0.1.52

11 months ago

0.1.51

11 months ago

0.1.50

11 months ago

0.1.49

11 months ago

0.1.48

11 months ago

0.1.47

11 months ago

0.1.46

11 months ago

0.1.45

11 months ago

0.1.44

11 months ago

0.1.43

11 months ago

0.1.42

11 months ago

0.1.41

11 months ago

0.1.40

11 months ago

0.1.39

11 months ago

0.1.38

11 months ago

0.1.37

11 months ago

0.1.36

11 months ago

0.1.35

11 months ago

0.1.34

11 months ago

0.1.33

11 months ago

0.1.32

11 months ago

0.1.31

11 months ago

0.1.30

11 months ago

0.1.29

11 months ago

0.1.28

11 months ago

0.1.27

11 months ago

0.1.26

11 months ago

0.1.25

11 months ago

0.1.24

11 months ago

0.1.23

11 months ago

0.1.22

11 months ago

0.1.21

11 months ago

0.1.20

11 months ago

0.1.19

11 months ago

0.1.18

11 months ago

0.1.17

11 months ago

0.1.16

11 months ago

0.1.15

11 months ago

0.1.14

11 months ago

0.1.13

11 months ago

0.1.12

11 months ago

0.1.11

11 months ago

0.1.10

11 months ago

0.1.9

11 months ago

0.1.8

11 months ago

0.1.7

11 months ago

0.1.6

11 months ago

0.1.5

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago