Coder Social home page Coder Social logo

wilsondonizetti / angular-datetime-inputs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from g1eb/angular-datetime-inputs

0.0 1.0 0.0 384 KB

๐Ÿ“… Angular directives for datetime inputs

Home Page: https://rawgit.com/g1eb/angular-datetime-inputs/master/

License: MIT License

JavaScript 23.01% HTML 23.83% CSS 53.16%

angular-datetime-inputs's Introduction

Datetime input UI element

This directive is designed to provide easy and intuitive input of moment.js datetime objects.

Desgined to be as simple as possible in order to afford intuitive interactions.

Converted into an angular directive for your convenience :)

Demo

Click here for a live demo.

Date input

Angular directive datetime input - date input

Time input

Angular directive datetime input - time input

Datetime input

Angular directive datetime input - datetime input

Install

  1. Install 'angular-datetime-inputs' with bower
bower install angular-datetime-inputs

or with npm

npm install angular-datetime-inputs
  1. Add 'g1b.datetime-inputs' module to your app config
angular.module('myApp', [
  'g1b.datetime-inputs',
  ......
])
  1. Use any of the directives in a view

For date input only:

<date-input date="date" on-change="print(date)" placeholder="Select date"></date-input>

For time input only:

<time-input time="time" on-change="print(time)" placeholder="Select time"></time-input>

For both date and time input:

<datetime-input datetime="datetime" on-change="print(datetime)" placeholder="Select datetime"></datetime-input>

Attributes

Property Usage Default Required
date moment.js datetime object or a datetime string none no
time moment.js datetime object or a datetime string none no
datetime moment.js datetime object or a datetime string none no
format moment.js compatible date/time format used for parsing initial datetime objects none no
date-format moment.js compatible date format used for display in date and datetime input directives 'DD MMMM YYYY' no
time-format moment.js compatible time format used for display in time and datetime input directives 'HH : mm : ss' no
min-date moment.js datetime object min datetime none no
max-date moment.js datetime object max datetime none no
hour-step step size for hour input 1 no
minute-step step size for minute input 1 no
second-step step size for second input 1 no
on-change Handler function that is fired on change of datetime object none no
on-close Handler function that is fired on close of the edit popover none no
placeholder Placeholder is shown when input object is undefined none no
allow-clear Allow users to clear selected datetime value false no
clear-text Clear text shown in the button used to clear date object Clear no
close-text Close text shown in the button used to close edit popover Close no
css-class custom css class name for datetime presentation none no

Datetime range

If you are looking for a range input of datetime objects, check out angular-datetime-range

Dependencies

angular-datetime-inputs's People

Contributors

g1eb avatar ibrahimhd avatar ryan-morris avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.