npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nepali-datepicker-and-dateinput

v1.0.4

Published

The aim of this package is to enable user to input nepali date and also select date from nepali calendar from date 1970-01-01 BS to 2099-12-30.

Downloads

34

Readme

Nepali-datepicker-and-dateinput

The aim of this package is to enable user to input nepali date and also select date from nepali calendar from date 1970-01-01 BS to 2099-12-30.

Installation

npm install --save nepali-datepicker-and-dateinput

Calendar-1 Calendar-2

Usage

import NepaliDatepicker from 'nepali-datepicker-and-dateinput';

export Datepicker = () => {

  const handleDateChange = (name, dateInMilli, bsDate, adDate) => {
    console.log(name); // Prints the field name of date input
    console.log(dateInMilli); // Prints the equivalent date millisecond
    console.log(bsDate); // Prints the bsDate
    console.log(adDate); // Prints the equivalent adDate
  }

  return (
    <NepaliDatepicker
      id="nepali-date"
      onChange={handleDateChange}
      label="नेपाली मिति"
      defaultDate="2077-01-01"
      defaultFormat
    />
  );
}

Props

| Props | Type | Default Value | Description | | ----------------------- | :-------------------: | :----------------------------------------: | :-------------------------------------------------------------------------------------------------: | | id | string | "nepali-calendar" | The identifier of date field . If there are more than one date input in form , then it is required. | | label | string | "मिति" | Label for date input | | showDefaultDate | Boolean | false | If true , today nepali date is shown in date input by default | | defaultDate | String or Long | | This props takes date either in "YYYY-MM-DD" format or directly takes equivalent millisecond | | defaultFormat | Boolean | false | If defaultDate props has value in format "YYYY-MM-DD" then this prop should be set as true | | disabled | Boolean | false | If date input field needs to be disabled then this props should be set as true | | locale | string ("ne" or "en") | "ne" | If "ne" then all text in calendar is shown in nepali else shown in english | | inputContainerClassName | string | | Can send custom classname for date input field | | maxDateErrorMessage | string | "२०९९ साल भन्दा बढी मिति समावेश हुने छैन" | Error message, shown if date is more then maximal date | | minDateErrorMessage | string | "१९७० साल भन्दा कम मिति समावेश हुने छैन" | Error message, shown if date is less then minimal date | | invalidFormatMessage | string | "मान्य ढाँचामा नभएको मिति समावेश हुने छैन" | Message displaying in text field if date is invalid | | invalidDateMessage | string | "पात्रोमा नभएको मिति समावेश गरिने छैन" | Message displaying in the text field if date is not in the calendar . For example 2077-12-35 |