javascript.js 434 B

1234567891011121314151617181920
  1. angular
  2. .module('mwl.calendar.docs')
  3. .controller('CellModifierCtrl', function(moment) {
  4. var vm = this;
  5. vm.events = [];
  6. vm.calendarView = 'month';
  7. vm.viewDate = moment().startOf('month').toDate();
  8. vm.cellModifier = function(cell) {
  9. console.log(cell);
  10. if (cell.label % 2 === 1 && cell.inMonth) {
  11. cell.cssClass = 'odd-cell';
  12. }
  13. cell.label = '-' + cell.label + '-';
  14. };
  15. });