axiossoftwork-nepali-date-picker-js
v1.0.6
Published
A simple Nepali date picker React component that provides a date token via the onDateSelect callback prop.
Readme
📅 Axios Nepali Date Picker JS
Axios Nepali Date Picker JS is a simple and lightweight React component designed specifically for selecting Nepali calendar dates. It provides easy-to-use props for configuration and handles date selection via a callback.
🚀 Installation
npm install axios-nepali-date-picker-js📦 Usage
import { NepDatePicker } from "axios-nepali-date-picker-js";
<NepDatePicker
domain="https://your-api-domain.com"
onDateSelect={(dateToken) => console.log("Selected Date Token:", dateToken)}
selectToday={true}
selectedDate="2081-04-16"
reset={false}
dateToken="20810416"
/>🔧 Props
domain(string) – (Optional) The base URL or domain used by the date picker.onDateSelect(function) – (Required) Callback triggered when a date is selected. Returns the Nepali date token (e.g.,"20810416").selectToday(boolean) – (Optional) Iftrue, today's Nepali date is selected by default.selectedDate(string) – (Optional) Pre-select a specific Nepali date (format:"YYYY-MM-DD").reset(boolean) – (Optional) Set totrueto reset the selected date.dateToken(string) – (Optional) Automatically selects a date using the provided date token.
📅 Example
<NepDatePicker
domain="https://nivid.nivid.app"
onDateSelect={(token) => setSelectedToken(token)}
selectToday={true}
reset={resetPicker}
dateToken="20810325"
/>🛠️ Features
- Fully compatible with Nepali dates.
- Option to auto-select today's date.
- Accepts a date token to preselect a specific date.
- Ability to reset the date picker when needed.
- Lightweight and easy to integrate into existing React apps.
📄 License
MIT © Axios Softwork Pvt. Ltd.
