Skip to content

Directive for AngularJS that sets model validation based on a minimum time value. Useful for UI Bootstrap Timepickers or <input type='time' /> elements

Notifications You must be signed in to change notification settings

spongessuck/gm.minTime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gm.minTime

Directive for AngularJS that sets model validation based on a minimum time value. Useful for UI Bootstrap Timepickers or <input type='time' /> elements

First, add the module to your app:

angular.app('app', ['gm.minTime'])

Then, use in a form like so:

<form name='myForm'>
  <input type='time' ng-model='startTime' />
  <input type='time' ng-model='endTime' min-time='startTime' />
</form>

The form will become invalid if startTime equals or exceeds endTime.

Demo on Plunker

About

Directive for AngularJS that sets model validation based on a minimum time value. Useful for UI Bootstrap Timepickers or <input type='time' /> elements

Resources

Stars

Watchers

Forks

Packages

No packages published