
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
time-picker-react
Advanced tools
npm install
npm run start:doc:dev
constructor(props) {
super(props);
this.state = {
startTime: moment().valueOf(),
};
}
componentDidMount() {
TimePicker.init(this.input, 'startTime', {
placement: 'bottom-start',
// time format
// { year: 2017, month: 10, date: 22, hour: 19, minute: 51, second: 0 }
// notice month is from 0
onTimeChange: (time) => {
this.setState({
startTime: moment(time).valueOf(),
});
},
time: this.state.startTime,
});
}
handleShowPicker() {
TimePicker.show('startTime');
}
render() {
return (
<input
type="text"
value={moment(this.state.startTime).format('YYYY-MM-DD HH:mm:ss')}
ref={ele => {this.input = ele;}}
onFocus={this.handleShowPicker}
/>
)
}
| Name | Default | Description |
|---|---|---|
| placement | "bottom-start" | position |
| onTimeChange | callback function triggered after time has changed | |
| time | now | initial time |
| clockPressChangeInterval | 300ms | when press clock panel chevron, how many time to change once |
if run start:doc:dev goes wrong like this:
events.js:182
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 127.0.0.1:8080
this is because the default port is blocked, only need to edit package.json start:doc:dev, change port field.
Then it will be ok.
Happy coding!
FAQs
time picker for react
We found that time-picker-react 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
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.