@subaranakhadka/nepali-datepicker
v1.5.9
Published
Nepali Datepicker (Bikram Sambat) as a ReactJS component
Downloads
21
Maintainers
Readme
Nepali Datepicker (Bikram Sambat) - React.js Component
Nepali static calendar (Bikram Sambat) as a ReactJS component
Install
npm install --save nepali-datepicker-reactjs
or,
yarn add nepali-datepicker-reactjs
Usage
For Typescript
import React, { useState } from "react"
import { NepaliDatePicker } from "@subaranakhadka/nepali-datepicker"
import "@subaranakhadka/nepali-datepicker/dist/index.css"
const App = () => {
const [date, setDate] = useState<string>("")
return (
<NepaliDatePicker
value={date}
onChange={(value: string) => setDate(value)}
options={{ calenderLocale: "ne", valueLocale: "en" }}
/>
)
}
export default App
For JavaScript
import React, { useState } from "react"
import { NepaliDatePicker } from "@subaranakhadka/nepali-datepicker"
import "@subaranakhadka/nepali-datepicker/dist/index.css"
const App = () => {
const [date, setDate] = useState("")
return (
<NepaliDatePicker
value={date}
onChange={(value) => setDate(value)}
options={{ calenderLocale: "ne", valueLocale: "en" }}
/>
)
}
export default App