react-nepali-type
v0.0.1
Published
ReactJS input component to type Nepali in Preeti ASCII and convert it into unicode
Maintainers
Readme
React Nepali Type
ReactJS input component to type Nepali in Preeti ASCII and convert it into unicode
Demo

Install
npm install --save react-nepali-type
or,
yarn add react-nepali-typeUsage
For Typescript
import React, { useState } from "react"
import { NepaliType } from "react-nepali-type"
import "react-nepali-type/dist/index.css"
const App = () => {
const [date, setDate] = useState<string>("")
return (
<form>
<label htmlFor='date'>Date</label>
<NepaliType
inputClassName='form-control'
className=''
value={date}
onChange={(value: string) => setDate(value)}
options={{ calenderLocale: "ne", valueLocale: "en" }}
placeholder={"Enter DOB"}
todayIfEmpty={false}
/>
</form>
)
}
export default AppFor JavaScript
import React, { useState } from "react"
import { NepaliType } from "react-nepali-type"
import "react-nepali-type/dist/index.css"
const App = () => {
const [date, setDate] = useState("")
return (
<form>
<label htmlFor='date'>Date</label>
<NepaliType
inputClassName='form-control'
className=''!
value={date}
onChange={(value) => setDate(value)}
options={{ calenderLocale: "ne", valueLocale: "en" }}
placeholder={"Enter DOB"}
todayIfEmpty={false}
/>
</form>
)
}
export default App