# ng-date-value-accessor

> Date value accessor for Angular

Latest version **0.0.2** (published 2018-02-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install ng-date-value-accessor
pnpm add ng-date-value-accessor
yarn add ng-date-value-accessor
bun add ng-date-value-accessor
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2018-02-14 |
| First published | 2018-02-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Xue Qin |
| Maintainers | 007300 |
| Keywords | angular, forms, ControlValueAccessor, DateValueAccessor |

## Links

- npm: https://www.npmjs.com/package/ng-date-value-accessor
- Repository: https://github.com/007300/ng-date-value-accessor
- npm.io page: https://npm.io/package/ng-date-value-accessor

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2018-02-14
- 0.0.1 — 2018-02-14

## README

# ng-date-value-accessor

[![Build Status](https://travis-ci.org/007300/ng-date-value-accessor.svg?branch=master)](https://travis-ci.org/007300/ng-date-value-accessor)

[![npm version](https://badge.fury.io/js/ng-date-value-accessor.svg)](https://badge.fury.io/js/ng-date-value-accessor)

A Date value accessor for Angular 5, inspired by angular-date-value-accessor.
You can use JavaScript Date objects directly with two-way data bindings (ngModel) as well as with reactive forms (formControlName/formControl).

In order to display the UTC date with timezone offset correctly (without breaking existing data, e.g. an ISO date 2018-01-31T23:00:00.000Z should be Feb 1st, 2018 in CET), the value will be formatted between angular form and native element.

## Examples:

Add the attribute `dateInput` to a date input control:

```html
<input type="date" name="birthday" [(ngModel)]="birthday" dateInput>

OR

<input type="date" formControlName="birthday" dateInput>
```

## Installation:

Install the package via yarn/npm:

```bash
yarn add ng-date-value-accessor
npm install --save ng-date-value-accessor
```

Then import the module via NgModule:

```js
// app.module.ts

import { DateValueAccessorModule } from "ng-date-value-accessor";

@NgModule({
  imports: [DateValueAccessorModule]
})
export class AppModule {}
```

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