angular-mighty-datepicker icon indicating copy to clipboard operation
angular-mighty-datepicker copied to clipboard

Request: Different class for dates that are not in the month

Open alexgoldstone opened this issue 9 years ago • 1 comments

Currently there are CSS classes for selectable dates, selected dates and disabled dates.

Currently dates that are not in the month use the 'disabled' class but I think having their own class is useful so that they can be styled independently of the disabled dates.

alexgoldstone avatar May 23 '16 00:05 alexgoldstone

@alexgoldstone, you can do a quick hack : The method _buildWeek return this :

return { date: day, selected: _isSelected(day) && withinMonth, inRange: _isInRange(day), disabled: !(withinLimits && withinMonth && filter), marker: withinMonth ? _getMarker(day) : void 0 };

As you can see, the attribute 'marker' will be false for days out of month. So you can juste overide the default template and add a custom class : <td ng-class="{mighty-picker-calendar__day--out-of-month: !day.marker}">

I hope it will help. The best solution should be to add the 'withinMonth' value to the attribute returned by this method.

Fabiencdp avatar Mar 19 '17 21:03 Fabiencdp