bk-nepali-datepicker-reactjs
Version:
Nepali Datepicker (Bikram Sambat) as a ReactJS component
77 lines (57 loc) • 2.34 kB
Markdown
# Nepali Datepicker (Bikram Sambat) - React.js Component
> Nepali Datepicker (Bikram Sambat) as a ReactJS component
[](https://www.npmjs.com/package/nepali-datepicker-reactjs)
[](https://standardjs.com)
[](https://travis-ci.org/puncoz-official/nepali-datepicker-reactjs)
[](https://twitter.com/PuncozNepal)
## [Demo](https://puncoz-official.github.io/nepali-datepicker-reactjs/)

## Install
```bash
npm install --save bk-nepali-datepicker-reactjs
or,
yarn add bk-nepali-datepicker-reactjs
```
## Usage
#### For Typescript
```tsx
import React, { useState } from "react"
import { NepaliDatePicker } from "bk-nepali-datepicker-reactjs"
import "bk-nepali-datepicker-reactjs/dist/index.css"
const App = () => {
const [date, setDate] = useState<string>("")
return (
<form>
<label htmlFor="date">Date</label>
<NepaliDatePicker inputClassName="form-control"
className=""
value={date}
onChange={(value: string) => setDate(value)}
options={{ calenderLocale: "ne", valueLocale: "en" }} />
</form>
)
}
export default App
```
#### For JavaScript
```jsx
import React, { useState } from "react"
import { NepaliDatePicker } from "bk-nepali-datepicker-reactjs"
import "bk-nepali-datepicker-reactjs/dist/index.css"
const App = () => {
const [date, setDate] = useState("")
return (
<form>
<label htmlFor="date">Date</label>
<NepaliDatePicker inputClassName="form-control"
className=""
value={date}
onChange={(value) => setDate(value)}
options={{ calenderLocale: "ne", valueLocale: "en" }} />
</form>
)
}
export default App
```
## License
MIT © [https://github.com/puncoz-official](https://github.com/puncoz-official)