nepali-patro-datepicker-react
v1.0.9
Published
Nepali Patro Datepicker as a ReactJS component
Maintainers
Readme
Nepali Patro Datepicker React
A lightweight and customizable Nepali (Bikram Sambat) datepicker component built for React.
📦 Installation
Install the package using npm or yarn:
npm install nepali-patro-datepicker-reactUsage
Here's a basic example of how to use the date-picker-np in your React project:
import React, { useState } from "react";
import { Datepicker } from "nepali-patro-datepicker-react";
import "nepali-patro-datepicker-react/style.css";
const App = () => {
const [selectedDate, setSelectedDate] = useState("2082-4-6");
return (
<Datepicker
value={selectedDate}
onChange={(date) => setSelectedDate(date)}
/>
);
};
export default App;Parameters:
date: string— A date string inYYYY-MM-DDformat.
Returns:
string— The equivalent BS date inYYYY-MM-DDformat.
Supported Nepali Date Range
The date picker supports selecting dates within the range:
- Minimum Date:
2000-01-01 - Maximum Date:
2099-12-31
