Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option for calendar weeks to start on Monday instead of Sunday #334

Merged
merged 1 commit into from Dec 1, 2018

Conversation

mikerodonnell89
Copy link
Member

Please provide a link to the associated issue.

#332

@@ -100,7 +103,7 @@ export class CalendarComponent implements OnInit, OnChanges, AfterViewChecked {
'November',
'December'
];
weekDays: string[] = ['S', 'M', 'T', 'W', 'T', 'F', 'S'];
weekDays: string[];
daysPerMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if February is 29 days

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a function determineDaysInMonth that determines if Feb has 28 or 29 days

@@ -694,6 +702,7 @@ export class CalendarComponent implements OnInit, OnChanges, AfterViewChecked {
this.constructCalendar();
this.constructCalendarYearsList();
}
this.weekDays = this.mondayStartOfWeek ? ['M', 'T', 'W', 'T', 'F', 'S', 'S'] : ['S', 'M', 'T', 'W', 'T', 'F', 'S'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to make this translatable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, however I think i18n should be a separate story

@droshev droshev added bug Something isn't working enhancement New feature or request documentation There is an issue with documentation labels Nov 30, 2018
@droshev droshev merged commit d010b09 into develop Dec 1, 2018
@droshev droshev deleted the enhancement/#332-calendar-first-day branch December 1, 2018 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation There is an issue with documentation enhancement New feature or request
Projects
No open projects
board
  
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

3 participants