New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-alldate-picker

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-alldate-picker

A date picker for your React app.

latest
Source
npmnpm
Version
1.0.38
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

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"

FAQs

Package last updated on 19 Dec 2023

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