Skip to content

Angular directive for selecting both date ranges from one handy calendar

Notifications You must be signed in to change notification settings

nueq22/angular-red-datepicker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular-Red-Datepicker

This is small angular directive for selecting both date ranges from one handy calendar. Useful for using in different filters.

Usage

  • Install: bower install angular-red-datepicker.
  • Add dependencies to your code.
  • Add redDatepickerModule module in your application dependencies.
angular.module('app', ['redDatepickerModule']);
  • Add attribute directives to your html:
    <red-datepicker locale="en"
                    list-show="true"
                    list-arr="{variable}"
                    output="{variable}"
                    today-btn="true"
                    number-of-days="6"></red-datepicker>
  • locale is optional and set language and rules for displaying calendar. By defaults is English. The list of languages you can look in the MomentJS.

  • list-show - showing the list of defalts date range. By defaults is false.

  • list-arr - array of objects where object - item of list {label: 'Name of label', days: 'number of days from today'}

  • output - set the variable for date output.

  • today-btn - show today button.

  • number-of-days - set quantity of days from start selection to today on init.

redDatepickerService - service for set date on init.

redDatepickerService.setData(start, end, true)
  • start - start date
  • end - end date
  • true - for calendar adjustment

Dependencies

About

Angular directive for selecting both date ranges from one handy calendar

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 40.6%
  • CSS 33.3%
  • HTML 26.1%