Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@netojose/react-select-datepicker
Advanced tools
# npm
npm install --save @netojose/react-select-datepicker
# yarn
yarn add @netojose/react-select-datepicker
You can see a working demo at this Sandbox
import React, { useState } from "react";
import SelectDatePicker from "@netojose/react-select-datepicker";
export default function App() {
const [date, setDate] = useState(new Date(2000, 0, 1));
const handleChange = value => setDate(value);
return (
<div>
<SelectDatePicker value={date} onDateChange={handleChange} />
<p>Chosen date: {date.toString()}</p>
</div>
);
}
Prop | Type | Description | Default | Options |
---|---|---|---|---|
value | Date | Current input value | REQUIRED | - |
minDate | Date | Minimum date allowed | new Date(1900, 0, 1) | - |
maxDate | Date | Maximum date allowed | new Date() | - |
className | string | Wrapper class name | null | - |
css | string | css function | null | - |
onDateChange | func | onChange date trigger | REQUIRED | - |
showErrors | boolean | Show or not error message | true | true, false |
showLabels | boolean | Show or not input labels | true | true, false |
yearLabel | boolean | Year label text | Year | Any string |
monthLabel | boolean | Month label text | Month | Any string |
dayLabel | boolean | Day label text | Day | Any string |
errorFormat | string | Format error message | 'Invalid date' | Any string |
errorMin | string | Error min value message | 'Date must be greater than allowed' | Any string |
errorMax | string | Error max value message | 'Date must be less than allowed' | Any string |
format | string | Inputs position | 'month/day/year' | 'day/month/year', 'day/year/month', 'month/day/year', 'month/year/day', 'year/month/day', 'year/day/month' |
monthNames | array | Array with month names | ['January', ..., 'December'] | An array with 12 strings |
className
prop can be useful to extend the component using Styled-componentscss
prop can be useful to extend the component using EmotionMIT © netojose
FAQs
A lightweight select date picker
We found that @netojose/react-select-datepicker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.