Socket
Socket
Sign inDemoInstall

angular-time-pick

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angular-time-pick

An angular directive time picker.


Version published
Weekly downloads
29
decreased by-14.71%
Maintainers
1
Install size
1.23 MB
Created
Weekly downloads
 

Readme

Source

bs-time-pick Build Status

A basic time picking directive for entering and validating the time of day.

Installation

bs-time-pick requires jquery and Angular 1.3.*

Install bs-time-pick with bower or npm

  bower install --save bs-time-pick
  npm install --save bs-time-pick

Or manually download the built file

Usage

Make your angular app depend upon the bs-time-pick module

angular.module("app", ["bs-time-pick"]);

This directive is intended to work together with ng-model which needs to be provided with a valid date object. If ng-model is null, a new Date will be created for the current day and bound to ng-model. The date model passed to ng-model can easily be shared with a date-picker widget which can select the year, month, day, and bs-time-pick can input the time of day.

NOTE You must use ng-model-options={ updateOn: "blur" }

Options:

  • bs-shake-count - the number of shakes the element will be given when invalid data is entered
  • bs-shake-distance - the distance of the shaking
  • bs-shake-duration - the duration of the shaking in milliseconds

Example

  <input type="text" ng-model="myDate" ng-model-options={ updateOn: "blur" } />
  {{ myDate | date:"h:mm a" }}

FAQs

Last updated on 09 Jan 2015

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