the background of the days are changed in the calendar
This commit is contained in:
@ -6,7 +6,7 @@ $this->title = 'Календарь ДР';
|
||||
?>
|
||||
<?= \backend\widgets\Calendar::widget([
|
||||
|
||||
'css' => '.success{color: orange;}',
|
||||
'css' => '.success{color: green;}',
|
||||
|
||||
'button' => Html::a('<i class="fa fa-table" aria-hidden="true"></i> Таблица',
|
||||
['table'], ['class' => 'btn btn-primary',]),
|
||||
|
@ -378,6 +378,14 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fully_day {
|
||||
background-color: #99ff99;
|
||||
}
|
||||
|
||||
.empty_day {
|
||||
background-color: #ff9999;
|
||||
}
|
||||
|
||||
.active_day {
|
||||
background: #cdcfce;
|
||||
}
|
@ -384,6 +384,14 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fully_day {
|
||||
background-color: #99ff99;
|
||||
}
|
||||
|
||||
.empty_day {
|
||||
background-color: #ff9999;
|
||||
}
|
||||
|
||||
.active_day {
|
||||
background: #cdcfce;
|
||||
}
|
@ -151,7 +151,15 @@ class CalendarHelper {
|
||||
}
|
||||
|
||||
static _getCalendarDay(dayNum, className = ``, color = ``) {
|
||||
return `<div class="calendar__day ${className}">
|
||||
let day = ''
|
||||
if (color === 'danger' && className !== 'inactive') {
|
||||
day = 'empty_day'
|
||||
}
|
||||
else if (color === 'success' && className !== 'inactive') {
|
||||
day = 'fully_day'
|
||||
}
|
||||
|
||||
return `<div class="calendar__day ${className} ${day} ">
|
||||
<span class="calendar__date ${color}">${dayNum}</span>
|
||||
</div>`;
|
||||
}
|
||||
|
Reference in New Issue
Block a user