
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
@meinefinsternis/react-horizontal-date-picker
Advanced tools
A simple component that allows the user to choose a date from a scrollable monthly view.
The package can be installed via npm:
npm install @meinefinsternis/react-horizontal-date-picker --save
Below is a simple example of how to use the Datepicker in a React view.
import React from "react";
import { Datepicker, DatepickerEvent} from "@meinefinsternis/react-horizontal-date-picker";
import { enUS } from "date-fns/locale";
const Example = () => {
const [date, setDate] = React.useState<{
endValue: Date | null;
startValue: Date | null;
rangeDates: Date[] | null;
}>({
startValue: null,
endValue: null,
rangeDates: [],
});
const handleChange = (d: DatepickerEvent) => {
const [startValue, endValue, rangeDates] = d;
setDate((prev) => ({ ...prev, endValue, startValue, rangeDates }));
};
return (
<Datepicker
onChange={handleChange}
locale={enUS}
startValue={date.startValue}
endValue={date.endValue}
/>
);
};
Common props you may want to specify include:
locale
: Locale
- locales directly exported from date-fns/locales.onChange
: (d: [Date | null, Date | null, Date[] | null]) => void
- subscribe to change eventsstartValue
: Date | null
- defines the initial start valueendValue
: Date | null
- defines the initial end valuestartDate
?: Date
- defines minimum date. Default new Date()
.endDate
?: Date
- defines maximum date. Default new Date() + 3 months
className
?: object
- apply a className to the customizedisabledDates
?: Date[]
- list of disabled datesFAQs
A simple component that allows the user to choose a date from a scrollable monthly view.
The npm package @meinefinsternis/react-horizontal-date-picker receives a total of 540 weekly downloads. As such, @meinefinsternis/react-horizontal-date-picker popularity was classified as not popular.
We found that @meinefinsternis/react-horizontal-date-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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.