1.0.1 • Published 3 months ago

nep-date v1.0.1

Weekly downloads
-
License
-
Repository
github
Last release
3 months ago

NepDatePicker

Angular date picker library for nepali date / AD and BS

This project was generated with Angular CLI version 16.0.3.

Installation

Install the package using the following command:

npm install NepDateModule

Usage

Import NepDateModule in your app module like this:

import { NepDateModule } from 'NepDateModule';


@NgModule({
  declarations: [...],
  imports: [..., NepDateModule, ...],
  providers: [...],
  bootstrap: [...],
})

and in your component :

<nep-date-picker><nep-date-picker/>

Properties

Inputs

NameTypeDefault ValueDescription
language'en' | 'ne''ne'Specifies the language for the date format.
hasFuturebooleantrueIndicates whether future dates are allowed.
formatstring'yy-mm-dd'The date format to be used. 'dd-mm-yy' or 'yy-mm-dd'
isRangebooleanfalseSpecifies whether the date selection is a range.

Outputs

NameTypeDescription
onDateChangeEventEmitterEvent emitted when the selected date(s) change.

For single date the output will be in the following format . i.e when isRange is false

{
  "nepaliDate": {
    "year": ,
    "month": ,
    "day":
  },
  "englishDate": {
    "year": ,
    "month": ,
    "day":
  }
}

And when range is set to true, i.e when isRange is false, the output will be as :

{
  "fromDate": {
    "nepaliDate": {
      "year": ,
      "month": ,
      "day":
    },
    "englishDate": {
      "year": ,
      "month": ,
      "day":
    }
  },
  "toDate": {
    "nepaliDate": {
      "year": ,
      "month": ,
      "day":
    },
    "englishDate": {
      "year": ,
      "month": ,
      "day":
    }
  }
}
1.0.1

3 months ago

1.0.0

3 months ago

0.0.1

7 months ago