# nep-date

> Nepali date picker component for angular

Latest version **1.0.1** (published 2024-03-02) · 0 weekly downloads

## Install

```sh
npm install nep-date
pnpm add nep-date
yarn add nep-date
bun add nep-date
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2024-03-02 |
| First published | 2024-03-02 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 256.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Safal Koirala |
| Maintainers | safalkoirala |
| Keywords | angular, date picker, javascript, nepali date picker, range picker, nep-date-picker |

## Links

- npm: https://www.npmjs.com/package/nep-date
- Repository: https://github.com/SafalKoirala/nep-date-picker
- Homepage: https://github.com/SafalKoirala/nep-date-picker#readme
- Issues: https://github.com/SafalKoirala/nep-date-picker/issues
- npm.io page: https://npm.io/package/nep-date

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.3.0

## Recent versions

- 1.0.1 (latest) — 2024-03-02
- 1.0.0 — 2024-03-02

## README

# NepDatePicker

Angular date picker library for nepali date / AD and BS

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.0.3.

## Installation

Install the package using the following command:

```bash
npm install NepDateModule
```

## Usage

### Import `NepDateModule` in your app module like this:
```typescript
import { NepDateModule } from 'NepDateModule';


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

```
### and in your component :
```html

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

```
## Properties

### Inputs

| Name       | Type                   | Default Value | Description                           |
|------------|------------------------|---------------|---------------------------------------|
| `language` | 'en' \| 'ne'           | 'ne'          | Specifies the language for the date format. |
| `hasFuture`| boolean                | true          | Indicates whether future dates are allowed. |
| `format`   | string                 | 'yy-mm-dd'    | The date format to be used. **'dd-mm-yy'** or **'yy-mm-dd'**           |
| `isRange`  | boolean                | false         | Specifies whether the date selection is a range. |

### Outputs

| Name             | Type             | Description                                |
|------------------|------------------|--------------------------------------------|
| `onDateChange`   | EventEmitter     | Event emitted when the selected date(s) change. |

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

```json
{
  "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 :

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

---
_Source: https://npm.io/package/nep-date · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
