Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
kat-day-picker
Advanced tools
react-day-picker is a flexible date picker component for React.
Check out the examples to see its features.
Installing via npm
npm install kat-day-picker --save
Using unpkg CDN
<script src="https://unpkg.com/react-day-picker"></script>
Installing via Bower
bower install kat-day-picker --save
The bower package exposes a global DayPicker
variable.
import React from 'react';
import DayPicker, { DateUtils } from "react-day-picker";
function sunday(day) {
return day.getDay() === 0;
}
class MyComponent extends React.Component {
state = {
selectedDay: new Date(),
}
handleDayClick(e, day, { selected, disabled }) {
if (disabled) {
return;
}
if (selected) {
this.setState({ selectedDay: null })
} else {
this.setState({ selectedDay: day });
}
},
render() {
return (
<DayPicker
initialMonth={ new Date(2016, 1) }
disabledDays={ sunday }
selectedDays={ day => DateUtils.isSameDay(this.state.selectedDay, day) }
onDayClick={ this.handleDayClick.bind(this) }
/>);
}
}
See Basic usage for a deeper explanation of the example above.
react-day-picker
your questions on StackoverflowFAQs
Flexible date picker component for React
The npm package kat-day-picker receives a total of 1 weekly downloads. As such, kat-day-picker popularity was classified as not popular.
We found that kat-day-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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.