@neoprospecta/angular-datetimepicker

Stable Datetimepicker to use across Neoprospecta sites

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
Minified + gzip package size for @neoprospecta/angular-datetimepicker in KB

Readme

Neoprospecta DatetimePicker

A plugin to pick date and time.

Instalation

npm install @neoprospecta/angular-datetimepicker

##Usage Load the DatetimePickerModule in your odule

import { DatetimePickerModule } from '@neoprospecta/angular-datetimepicker';

Use it in your tamplate

<np-datetime-picker
    [(ngModel)]="sample.sampling_date"
    name="sampling_date"
    placeholder="Data coleta"
    close-on-select="true"
    date-format="dd/MM/yyyy"
    date-only="true"
    (change)="doSomethingWithTheChoosenDate"
></np-datetime-picker>

##Options |Attribute |Type |Default |function | |--- |--- |--- |--- | |name |string |undefined |The input name| |placeholder |string |undefined |The input placeholder| |date-only |boolean |false |Select only date| |time-only |boolean |false |Select only time| |close-on-select |boolean |false |Close the dialog when a date is selected| |date-format |string |yyyy-MM-dd |The date format that sould be displayed in the picker| |first-day-of-week |number |sunday |The first day of the week| |default-value |string |undefined |The default value to be used in the picker| |minute-step |number |1 |The step size of the minute selection slider| |min-date |Date |undefined |The minimum accepted date| |max-date |Date |undefined |The maximum accepted date| |min-hour |number |undefined |The minimum accepted hour| |max-hour |number |undefined |The maximum accepted hour| |disabled-dates |Array |undefined |A list of dated that cannot be selected|

API

The change method is called when the input value changes. With it you can do some custom work when a date is selected.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.