Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@atto-byte/react-month-picker
Advanced tools
Month-Picker Component offers a popup month selection panel with responsive layouts.
Month-Picker Component offers a popup month selection panel with responsive layouts.
yarn add react-month-picker
or
npm install react-month-picker --save
Demo file in repository: ./examples/demo.html
./examples/demo.jsx
import Picker from 'react-month-picker'
render() {
let pickerLang = {
months: ['Jan', 'Feb', 'Mar', 'Spr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
, from: 'From', to: 'To'
}
, mvalue = {year: 2015, month: 11}
, mrange = {from: {year: 2014, month: 8}, to: {year: 2015, month: 5}}
let makeText = m => {
if (m && m.year && m.month) return (pickerLang.months[m.month-1] + '. ' + m.year)
return '?'
}
return (
<ul>
<li>
<label>Pick A Month</label>
<div className="edit">
<Picker
ref="pickAMonth"
years={[2008, 2010, 2011, 2012, 2014, 2015, 2016, 2017]}
value={mvalue}
lang={pickerLang.months}
onChange={this.handleAMonthChange}
onDismiss={this.handleAMonthDissmis}
>
<MonthBox value={makeText(mvalue)} onClick={this.handleClickMonthBox} />
</Picker>
</div>
</li>
<li>
<label>Pick A Span of Months</label>
<div className="edit">
<Picker
ref="pickRange"
years={{min: 2010, max: 2018}}
range={mrange}
lang={pickerLang}
theme="dark"
onChange={this.handleRangeChange}
onDismiss={this.handleRangeDismiss}
>
<MonthBox value={makeText(mrange.from) + ' ~ ' + makeText(mrange.to)} onClick={this._handleClickRangeBox} />
</Picker>
</div>
</li>
</ul>
)
}
MonthBox is a customized component defined for the demo.
CSS: import css/month-picker.css
SCSS: 1) import bourbon library (http://bourbon.io/), 2) import scss/month-picker.scss
@years:
@value: default value for picking a single month, e.g. {year: 2015: month: 11}
@range: default value for picking a span of months, e.g. {from: {year: 2014: month: 7}, to: {year: 2015: month: 11}}
@lang: language texts
@theme: theme setting of month-picker; 2 options (light/dark); default theme is light
npm install
npm run _build
FAQs
Month-Picker Component offers a popup month selection panel with responsive layouts.
We found that @atto-byte/react-month-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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.