
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
react-multi-date-picker
Advanced tools
a simple React datepicker component for work with gregorian, persian and arabic calendars
npm install --save react-multi-date-picker
import react from "react";
import DatePicker from "react-multi-date-picker";
export default function Example() {
return <DatePicker />;
}
https://shahabyazdi.github.io/react-multi-date-picker
Key | value | default | Availability (DatePicker/ Calendar) |
---|---|---|---|
value | Date, DateObject, String, Number or Array | new Date() | both |
multiple | Boolean | false (true if value is Array) | both |
range | Boolean | false | both |
timePicker | Boolean | false | both |
onlyTimePicker | Boolean | false | both |
mustShowDates | Boolean | false (true in multiple & range mode) | both |
format | String | YYYY/MM/DD | both |
local | String ( "en", "fa" or "ar" ) | en | both |
calendar | String ("gregorian", "persian" or "arabic") | gregorian | both |
onChange | Function | undefined | both |
className | String | "" | both |
inputClass | String | "" | DatePicker |
name | String | "" | DatePicker |
style | Object | {} | DatePicker |
type | String ("input", "input-icon", "button", "icon") | input | DatePicker |
render | React.Component, Function | undefined | DatePicker |
disabled | Boolean | false | DatePicker |
placeholder | String | "" | DatePicker |
<DatePicker
value={new Date()}
/>
<DatePicker
value={new Date(2020,9,27)}
/>
<DatePicker
value="2020/08/27"
/>
<DatePicker
value="2020/27/08"
format="YYYY/DD/MM"
/>
<DatePicker
value="August 27 2020"
format="MMMM DD YYYY"
/>
<DatePicker
value="2020/08/27 12:30:31"
format="YYYY/MM/DD HH:mm:ss"
timePicker
/>
<DatePicker
value={new Date()}
format="YYYY-MM-DD HH:mm:ss"
timePicker
/>
<DatePicker
value="August 27 2020 12:30:31 am"
format="MMMM DD YYYY hh:mm:ss a"
timePicker
/>
<DatePicker
value="12:30:31 am"
format="hh:mm:ss a"
onlyTimePicker
/>
<DatePicker
value={new Date()}
format="hh-mm-ss A"
onlyTimePicker
/>
<DatePicker
value={new Date()}
format="YYYY/MM/DD hh:mm:ss a"
timePicker
onChange={dateObject=>{
console.log(dateObject.toDate())
}}
/>
<DatePicker
value="2020/08/27 11:10:59 am"
format="YYYY/MM/DD hh:mm:ss a"
timePicker
onChange={dateObject =>{
if(dateObject.isValid){
console.log(dateObject.format())
}
}}
/>
<DatePicker
value={new Date()}
format="YYYY/MM/DD hh:mm:ss a"
calendar="persian"
local="fa"
timePicker
onChange={dateObject =>{
console.log(dateObject.convert("gregorian").format())
}}
/>
<DatePicker
value="1399/06/05 12:30:24 pm"
format="YYYY/MM/DD hh:mm:ss a"
calendar="persian"
local="en"
timePicker
/>
<DatePicker
calendar="arabic"
local="ar"
/>
FAQs
A simple React datepicker component for working with gregorian, persian, arabic and indian calendars with the ability to select the date by single, multiple, range and multiple range pickers.
The npm package react-multi-date-picker receives a total of 54,285 weekly downloads. As such, react-multi-date-picker popularity was classified as popular.
We found that react-multi-date-picker demonstrated a healthy version release cadence and project activity because the last version was released less than 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.