1.0.38 • Published 5 months ago

react-alldate-picker v1.0.38

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

A date picker for your React app.

✨ Features

  • Pick days, months, years, or even decades
  • No moment.js/day,js needed

📦Install

npm react-alldate-picker

🔨Usage

import React, { useState } from "react";
import { DatePicker } from "react-alldate-picker";

const Test = () => {

    const [value, setValue] = useState(new Date())

    const handleOnChange = (timestamp) => {
        console.log("timestamp", timestamp)
    }

    return (
        <div>
            <DatePicker 
                onChange={handleOnChange}
                value={value}
            />
        </div>
    )
}

export default Test

User guide

DatePicker

Props

Prop nameDescriptionDefault valueExample values
onChangeFunction called when the user picks a valid date.n/a(timestamp) => console.log(timestamp)
minDateMinimum date that the user can select. Periods partially overlapped by minDate will also be selectable.new Date("0001-01-01")Date: new Date()
maxDateMaximum date that the user can select. Periods partially overlapped by maxDate will also be selectable.new Date("9999-12-31")Date: new Date()
valueInput value.n/aDate: new Date(2023, 12, 08)
iconContent of the calendar button. Setting the value explicitly to null will hide the icon.(default icon)React element:
footerfooter of the calendar. Setting the value explicitly to null will hide the footer.(default footer)React element:
onCloseFunction called when the user closed the picker.n/a() => console.log("onClose")
placeholderplaceholder for the day input."selecte date""select"
1.0.38

5 months ago

1.0.33

5 months ago

1.0.37

5 months ago

1.0.36

5 months ago

1.0.35

5 months ago

1.0.34

5 months ago

1.0.29

5 months ago

1.0.32

5 months ago

1.0.31

5 months ago

1.0.30

5 months ago

1.0.26

5 months ago

1.0.25

5 months ago

1.0.24

5 months ago

1.0.23

5 months ago

1.0.28

5 months ago

1.0.27

5 months ago

1.0.19

5 months ago

1.0.22

5 months ago

1.0.21

5 months ago

1.0.20

5 months ago

1.0.18

5 months ago

1.0.17

5 months ago

1.0.16

5 months ago

1.0.15

5 months ago

1.0.14

5 months ago

1.0.13

5 months ago

1.0.12

5 months ago

1.0.11

5 months ago

1.0.10

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago