Socket
Socket
Sign inDemoInstall

angular-datetime-inputs

Package Overview
Dependencies
3
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angular-datetime-inputs

UI elements for datetime input, converted to angular directives for your convenience.


Version published
Weekly downloads
84
increased by37.7%
Maintainers
1
Install size
2.41 MB
Created
Weekly downloads
 

Readme

Source

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

PropertyUsageDefaultRequired
datemoment.js datetime object or a datetime stringnoneno
timemoment.js datetime object or a datetime stringnoneno
datetimemoment.js datetime object or a datetime stringnoneno
formatmoment.js compatible date/time format used for parsing initial datetime objectsnoneno
date-formatmoment.js compatible date format used for display in date and datetime input directives'DD MMMM YYYY'no
time-formatmoment.js compatible time format used for display in time and datetime input directives'HH : mm : ss'no
min-datemoment.js datetime object min datetimenoneno
max-datemoment.js datetime object max datetimenoneno
hour-stepstep size for hour input1no
minute-stepstep size for minute input1no
second-stepstep size for second input1no
on-changeHandler function that is fired on change of datetime objectnoneno
on-closeHandler function that is fired on close of the edit popovernoneno
placeholderPlaceholder is shown when input object is undefinednoneno
allow-clearAllow users to clear selected datetime valuefalseno
clear-textClear text shown in the button used to clear date objectClearno
close-textClose text shown in the button used to close edit popoverCloseno
css-classcustom css class name for datetime presentationnoneno

Datetime range

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

Dependencies

Keywords

FAQs

Last updated on 21 Mar 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc