File tree Expand file tree Collapse file tree 3 files changed +23
-11
lines changed
src/app/modules/shared/components/month-picker Expand file tree Collapse file tree 3 files changed +23
-11
lines changed Original file line number Diff line number Diff line change 11< div class ="card-header ">
2- < div class ="d-flex align-items-center ">
3- < button class ="btn mr-auto " (click) ="changeYear('subtract') ">
4- < i class ="fa fa-chevron-left "> </ i >
5- </ button >
6- < p >
7- {{selectedYearText}}
8- </ p >
9- < button class ="btn ml-auto " (click) ="changeYear('add') ">
10- < i class ="fa fa-chevron-right "> </ i >
11- </ button >
2+ < div class ="row align-items-center ">
3+ < div class ="col-sm-4 ">
4+ < button class ="btn mr-auto " (click) ="changeYear('subtract') ">
5+ < i class ="fa fa-chevron-left "> </ i >
6+ </ button >
7+ </ div >
8+ < div class ="col-sm-4 ">
9+ < p class ="text-center year-text ">
10+ {{selectedYearText}}
11+ </ p >
12+ </ div >
13+
14+ < div class ="col-sm-4 text-right ">
15+ < button *ngIf ="selectedYear < currentYear " class ="btn ml-auto " (click) ="changeYear('add') ">
16+ < i class ="fa fa-chevron-right "> </ i >
17+ </ button >
18+ </ div >
1219 </ div >
1320</ div >
1421< div class ="row content-months ">
Original file line number Diff line number Diff line change 99 margin : 0 ;
1010}
1111
12+ .year-text {
13+ margin-bottom : 0 ;
14+ }
15+
1216.month {
1317 background : $primary ;
1418 color : white ;
Original file line number Diff line number Diff line change @@ -16,10 +16,11 @@ export class MonthPickerComponent implements OnInit {
1616 selectedMonthIndex : number ;
1717 selectedYearMoment : moment . Moment ;
1818 selectedYear : number ;
19-
2019 selectedYearText : string ;
2120 months : Array < string > = [ ] ;
2221
22+ currentYear = new Date ( ) . getFullYear ( ) ;
23+
2324 constructor ( ) {
2425 this . selectedYearMoment = moment ( ) ;
2526 this . selectedMonthMoment = moment ( ) ;
You can’t perform that action at this time.
0 commit comments