
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-anpicker
Advanced tools
react-anpicker is a free and light component in react for date picker mostly based on Intl and predefined function for converting dates

react-anpicker requires react "^19.0.0", react-dome "^19.0.0" to run.
run this command:
npm i react-anpicker
add css to your project
import "react-anpicker/dist/styles.css";
import { AnPicker } from 'react-anpicker';
...
const [date, setDate] = useState(null);
const handleChange = (date: Date | null, localDate: string | null) => { }
<AnPicker value={date} onChange={handleChange} />
...
{
title:string-calander title in sidebar
name: string-locale from Intl like "en-US" or "fa-IR" ,...
startOfWeek: number-if your week not starts with monday, you can specifing it(sunday=-1,tusday=1);
rtl: boolean;
todayButtonText: string,
daysOfEachMonth: (year: number, month: number) => number-a functio that return number of days in each month
numberConverter: (number: string) => number- get number in other languages in convert them to eng number;
convertToDate: (localYear: number, localMonth: number, localDay: number) => [number, number, number]- a function that takes local date and retrun eq in gregorian date;
}
an object that needs to be set if you use another locale, default is been configed for "fa-Ir"

for this calander use locale like below:
{
rtl: false,
convertToDate: (y, m, d) => [y, m, d],
daysOfEachMonth: (y, m) => {
switch (m) {
case 1:
case 3:
case 5:
case 6:
case 7:
case 8:
case 10:
case 12:
return 31;
case 2:
let isKabise = false;
if (y % 400 === 0) isKabise = true;
else if (y % 100 === 0) isKabise = false;
else if (y % 4 === 0) isKabise = true;
return isKabise ? 29 : 28;
default:
return 30;
}
},
name: "en-US",
numberConverter: (n) => parseInt(n),
startOfWeek:0,
title:"Gregorian",
todayButtonText:"today"
}
FAQs
a react date picker for supporting persian dates
The npm package react-anpicker receives a total of 82 weekly downloads. As such, react-anpicker popularity was classified as not popular.
We found that react-anpicker demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.