Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
@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
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.