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

Skip to content

fknight3/angular-dayparts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular dayparts

Angular directive for select hours in a week.

Demo on Plunker

Code based on this StackOverflow answer

Sample

Install it with Bower or npm

bower install angular-dayparts
npm install angular-dayparts

Include the module in your app

angular.module('myapp', ['angular-dayparts'])

Configure the directive inside the controller

$scope.options = {
    // Reset button
    reset: true, // default false
    
    // Event triggered when selecting a cell
    onChange: function(selected) {
        console.log('selected: ', selected)
    },
    
    // Prepopulated cells
    selected: ['monday-14', 'monday-15'],
    
    // When true clicking on the day name it will select the entire row
    disableRowSelection: true, // default false
    
    // When true clicking on the hour it will select the entire columns
    disableColumnSelection: true // default false
};

Call the directive from your page

<angular-dayparts options="options"></angular-dayparts>

License

Released under the terms of MIT License.

About

Angular directive for select hours in a week

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 40.8%
  • CSS 34.6%
  • JavaScript 24.6%