Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Honoo/angular-dateselect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-dateselect

A simple datepicker in Angular.JS.

Setup

Make sure the paths to the required libraries are set. See index.html for guidance.

Usage

See index.html and app.js for examples.

Add <date-select></date-select> to your HTML. To register a function to get the date value, add set-fn="setMyDateFn(dateGetFn)" to the date-select element as an attribute. Do not change set-fn and dateGetFn.

Then add:

$scope.setMyDateFn = function(dirDateFn){ $scope.myDateFn = dirDateFn; };

To your controller. Call $scope.myDateFn to get the date as a string. The output format is dd/mm/yyyy. If you wish to change the format, modify it in $scope.getDate in the directive.

The example in index.html and app.js:

Example

Optional parameters (set as attributes):

  • minYear: The oldest allowed year.
  • maxYear: The most recent allowed year.

License

Licensed with the MIT License.

About

A simple datepicker in Angular.JS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published