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.
tt-react-calendar
Advanced tools
A no-frills calendar widget that lets you bring your own styling. This component
takes a start date, an end date, and a renderDay
function, and then gets out
of the way.
npm install --save tt-react-calendar
import Calendar from 'tt-react-calendar';
function renderDay(day) {
return <div className="day">{day.format('dd')}</div>
}
function MyComponent() {
return (
<Calendar
className="calendar-container"
dayAbbrevs={['Su', 'M', 'T', 'W', 'Th', 'F', 'Sa']}
dayHeaderStyle={Calendar.DayHeaderStyles.InFirstMonth}
firstRenderedDay="2016-12-25"
lastRenderedDay="2017-02-12"
monthClassName="calendar-month"
monthHeaderFormat="MMMM YYYY"
renderDay={renderDay}
/>
);
}
Name | Type | Description |
---|---|---|
className | string | Class name for the calendar's container element |
dayAbbrevs | Array.<string> | Array of day names, starting with Sunday. Defaults to ['Su', 'M', 'T', 'W', 'Th', 'F', 'Sa'] . |
dayHeaderStyle | Enum | Determines where the day column headers are rendered. Can be one of Calendar.DayHeaderStyles.InFirstMonth (the default), Calendar.DayHeaderStyles.AboveFirstMonth , or Calendar.DayHeaderStyles.InEveryMonth |
firstRenderedDay | varied | The first date that will be rendered as part of the calendar. Can be any type that moment's constructor supports. |
lastRenderedDay | varied | The last date that will be rendered as part of the calendar. Can be any type that moment's constructor supports. |
monthClassName | string | Class name to add to each month element |
monthHeaderFormat | string | Format of the month header text. See moment.format for the available options. Defaults to 'MMMM YYYY' . |
renderDay | function | A function that takes a moment object of a single day as a parameter and returns a React element. Defaults to (day) => <div>{day.format('YYYY-MM-DD')}</div> |
Issues/PRs welcome! Linting/automated tests coming soon.
Distributed under the MIT License. See LICENSE
for more information.
Developers:
FAQs
A React calendar component with as few frills as humanly possible
The npm package tt-react-calendar receives a total of 24 weekly downloads. As such, tt-react-calendar popularity was classified as not popular.
We found that tt-react-calendar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.