Work Week view
Closed this issue · 10 comments
Hello,
I would like to use MudCalendar for work planning. Usually the work is done on work days only - excluding Saturday and Sunday, so we can save some horizontal space and display more data in a cell.
This feature request relates to a previous one: #105
Though here I would like to get a fourth button (work week, customizable/translated) in addition to existing month, week, day views.
If that makes sense, I could contribute and make a pull request:
- new parameter to show Work Week view button (hidden by default)
- updates to WorkView component
- translations
- test updates
Sounds good. That would be great if you could do that and make a pull request.
Thanks! That looks really good.
My only issue is with the new FirstDayOfWeek property. It defaults to Sunday, but in my culture Monday is the first day of week. So now I have the problem that the normal week view is starting on Sunday and the DatePicker also uses Sunday as the first day of week.
I think it would be better to make this property nullable and if null then use the current culture settings. This is how the DatePicker in MudBlazor works:
Hey,
5918292
fixed FirstDayOfWeek property - now it works as previously if unset.
This fix also reverted some changes to old tests - that's nice.
Looks good!
Hi thank you for this contribution,
In my case an offical week is sun-sat and a work week is mon-fri. (But some calendars show as sun-sat and some are mon-sun)
So with no configuration of the MudCalendar, the week view shows sun-sat which is correct but the work week view shows sun-thurs, which I expect to be mon-fri. If I set FirstDayOfWeek to monday then the work week is right mon-fri but the week is now mon-sun.
Could there be a FirstDayOfWorkWeek as well so I could achieve sun-sat for week and mon-fri for work week?
Hi,
sure, if Dan agrees, I could prepare a PR with new FirstDayOfWorkWeek param.