https://github.com/icklechris/ic-datepicker
Angular (2+) datepicker component
https://github.com/icklechris/ic-datepicker
angular angular2 datepicker datepicker-component ng2
Last synced: 13 days ago
JSON representation
Angular (2+) datepicker component
- Host: GitHub
- URL: https://github.com/icklechris/ic-datepicker
- Owner: IckleChris
- Created: 2017-02-12T15:27:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-19T15:39:22.000Z (over 7 years ago)
- Last Synced: 2025-06-01T01:58:06.436Z (24 days ago)
- Topics: angular, angular2, datepicker, datepicker-component, ng2
- Language: TypeScript
- Homepage: https://icklechris.github.io/ic-datepicker
- Size: 4.85 MB
- Stars: 27
- Watchers: 3
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ic Datepicker
[Docs & Example](https://icklechris.github.io/ic-datepicker)
**Warning:** This component is still in pre-release. Although the component should be stable, until v1 is released there is potential for API changes whilst things are finalised. To prevent issues, ensure your `package.json` file specifies a specific version (e.g. `"ic-datepicker": "0.0.5"`).
## Installation
Install the component via NPM;
```
npm install -S ic-datepicker
(or)
yarn add ic-datepicker
```Import the `IcDatepickerModule` into your module;
```typescript
// app.module.tsimport { IcDatepickerModule } from 'ic-datepicker';
@NgModule({
imports: [
IcDatepickerModule,
],
})
```## Usage
Use the `` element, optionally providing an `IcDatepickerOptionsInterface` instance containing overriding options ([see defaults](https://icklechris.github.io/ic-datepicker/options)).
```typescript
import { IcDatepickerOptionsInterface } from 'ic-datepicker';@Component({
selector: 'my-example-component',
template: `
`,
styles: ``
})
export class MyExampleComponent implements OnInit {
datepickerOptions: IcDatepickerOptionsInterface;
exampleForm: FormGroup;
modelDatepicker: any;ngOnInit() {
this.datepickerOptions = {
position: 'top'
};this.exampleForm = new FormGroup({
datepicker: new FormControl()
});
}
}```