Advantages
- Simple and flexible AngularJS directive that support selecting, formatting and parsing both date and time.
- Date/time can be localized (thanks to MomentJS).
- It supports limits (min and max date/time) and ranges.
- It is pretty simple to use and accessible.
- You can disable functionality (i.e. if you need only time picker - you are welcome).
- You can customize increment steps of years, months, dates, hours, minutes.
- And it support different date/time formatting for model value and for view value.
Here is it
Installation
angie-date-picker
depends on AngularJS and MomentJS libraries, so install them too. jQuery is not required.
bower install --save angular moment
Install using Bower (recommended):
bower install --save angie-date-picker
Install using NPM:
npm install --save angie-date-picker
Usage
First of all add styles and scripts to a page:
Step two: add module angie.datePicker
into your Angular app dependencies:
angular;
Step three: configure default settings according to your needs:
angular;
Step four: define date pickers settings and model values in your controller:
angular;
Step five: use directive in your markup:
Birthday: <!-- Popup --> Next meeting at: {{ meeting }} <!-- Inline date picker -->
Contribute
Please, send pull requests if you want to contribute and make date picker more featureful.
License
MIT