Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
@marinos33/react-week-time-range-picker
Advanced tools
A React component for selecting a range of hours per day of the week
It's a simple React component for selecting a range of hours per day of the week.
This component is a fork from https://github.com/lizhongzhen11/react-week-time-range-picker with various change such as:
To start using it do
npm install @marinos33/react-week-time-range-picker --save
And then you can import it like this:
import ReactWeekTimeRangePicker from '@marinos33/react-week-time-range-picker'
<ReactWeekTimeRangePicker />
The available props for this components are the following.
Prop | Description | Type | Default |
---|---|---|---|
hasHalfHour | Wheter to display the hour and is following half hour | boolean | false |
selectedData | The data displayed in the component | SelectedDataProps[ ] (more information below) | [ ] |
outerCellColor | The color of the outer cells | string | #DDDEE1 |
innerCellColor | The color of the inner cell when inactive | string | #f5f5f5 |
fontColor | The color of the text | string | #000000 |
summaryColor | The background color of the summary at the bottom of the component | string | #ffffff |
Function | Description | Return Type |
---|---|---|
selectTimeRange | Function to get the selectedData and do whetever you want with. | void |
Example:
import ReactWeekTimeRangePicker from '@marinos33/react-week-time-range-picker'
const handleSelectTimeRange = (selectedData: SelectedDataProps[]) => {
console.log(selectedData)
}
<ReactWeekTimeRangePicker hasHalfHour={true} selectTimeRange={handleSelectTimeRange} />
The structure of SelectedDataProps:
{
iden?: string; // the id of the day. eg: monday = 1, tuesday = 2, ... sunday = 7
timeRanges?: string[][]; // the time from the selected box to the end box. eg: [['02:30', '03:00']]
times?: string[]; //the time original clicked on. eg: ['02:30']
dayName?: string; //the name of the day. eg: monday, tuesday, etc
}
FAQs
A React component for selecting a range of hours per day of the week
The npm package @marinos33/react-week-time-range-picker receives a total of 9 weekly downloads. As such, @marinos33/react-week-time-range-picker popularity was classified as not popular.
We found that @marinos33/react-week-time-range-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
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
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.