Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

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

Open
alexgoldstone opened this issue May 23, 2016 · 1 comment
Open

Comments

@alexgoldstone
Copy link

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.

@Fabiencdp
Copy link

Fabiencdp commented Mar 19, 2017

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants