Open elliotwesoff opened 7 years ago
hi @elliotwesoff I really love this styling, would you mind to make this as default and make a PR if you have time to do so please?
Sure thing. What about the bug though? ;)
Hi, i have the same bug, but i think its because the names of days are harcoded in the HTML you can see this in ng2-datepicker.component.html
<div class="datepicker-calendar-day-names"> <span>S</span> <span>M</span> <span>T</span> <span>W</span> <span>T</span> <span>F</span> <span>S</span> </div>
Oh yeah. Hmmmmm....
in the near future I'll plan to drop moment
and integrate date-fns
. I will solve both issues then.
@elliotwesoff It actually is working correctly when you set the [options]="{ firstWeekdaySunday: false }"
A value of false results in the week starting on Monday. If you set it [options]="{ firstWeekdaySunday: true }"
it will start on Sunday. You have it currently set to a 'false' string which actually evaluates as truthy if you look at this property in the class constructor:
this.firstWeekdaySunday = obj && obj.firstWeekdaySunday ? obj.firstWeekdaySunday : false;
My recommendation to the developer would be to set the value to true by default as doing so will align the calendar with the days of the week in the static html for the calendar and will presumably satisfy the vast majority of use cases.
@overtureweb I know I've got a string there. I wrote that to illustrate the strange behavior. Of course it shouldn't work when you use a string, but it does... sort of. I'll update my datepicker and try it again. If it works I'll close the issue.
This issue is still in the latest version with angular2 version 4.0.0
@jkuri The default theme is nice. But the day title header's (S M T W....) color are too dark rendering them nearly unreadable which can be seen here:
This appears to be a two part bug.
The dates are not being displayed under the proper weekday. I didn't notice this until I tried to implement the firstWeekdaySunday option.
The firstWeekdaySunday option doesn't respond to a boolean value like shown in the interface options.
The options hash in the following block of code doesn't do anything at all.
However, when the firstWeekdaySunday option is provided any string, it adjusts the dates accordingly.
The calendar will display correctly (although with Sunday still being the first day) after using this block of code:
Example of part one - displaying calendar days incorrectly: