Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
mui-multiple-dates-picker
Advanced tools
Date Picker with multiple selection based on Material UI, forked from @randex. Migrated to MUI v5 by @Shiftrdw
Lets user pick more than one date from the date picker.
This is a fork of mui-multiple-dates-picker
. I needed a date picker that is built on Material-UI and supports multiple dates selections, it was built by @randex and I needed a version compatible with MUI v5 and react v18. So I forked and migrated his library
Dialog
component being the root of itTo install the component run this command:
npm i --save mui-multiple-dates-picker
import MultipleDatesPicker from 'mui-multiple-dates-picker'
const Example = () => {
const [open, setOpen] = useState(false)
return (
<div>
<Button onClick={() => setOpen(!open)}>
Select Dates
</Button>
<MultipleDatesPicker
open={open}
selectedDates={[]}
onCancel={() => setOpen(false)}
onSubmit={dates => console.log('selected dates', dates)}
/>
</div>
)
}
Prop Name | Type | Default | Description |
---|---|---|---|
open | bool, required | false | Is Date Picker Dialog open or not |
selectedDates | Array of Date | [] | MultipleDatesPicker uses its own internal array of selected date and sends it only when user clicks Submit button. But you can still use this variable to pass initial value to it — array will be copied. |
disabledDates | Array of Date | null | An array of dates to disable. They will appear gray and user won't be able to select them. |
onCancel | func, required | null | Fires when user clicks Cancel button. You need to handle closing the picker when this handler fires. |
onSubmit | func, required | null | Fires when user clicks Submit button with only one parameter: array of selected Date s: onSubmit(selectedDates) . You need to handle closing the picker when this handler fires. |
readOnly | bool | false | Is Date Picker interactive. Use this if you just want to display dates to the user. Submit button will be hidden and onCancel will be fired when user presses "Dismiss" button. |
cancelButtonText | string | if readOnly then "Dismiss" is not then "Cancel" | Cancel button title |
submitButtonText | string | Submit | Submit button title |
selectedDatesTitle | string | Selected Dates | Selected dates list header title |
I don't have enough time to maintain this library, so pull requests will be greatly appreciated!
git clone https://github.com/Shiftrdw/material-ui-multiple-dates-picker.git
cd material-ui-multiple-dates-picker
npm i
app
folder: cd app
npm i
npm start
to launch the demo app.app/src/lib
. Edit the code and watch the changes in the browser.Happy coding and thank you for your help!
FAQs
Date Picker with multiple selection based on Material UI, forked from @randex. Migrated to MUI v5 by @Shiftrdw
The npm package mui-multiple-dates-picker receives a total of 20 weekly downloads. As such, mui-multiple-dates-picker popularity was classified as not popular.
We found that mui-multiple-dates-picker 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.