Skip to content

Conversation

@salahmak
Copy link

@salahmak salahmak commented Jan 2, 2025

Description

In WeekView, the styling for the Divider between the week days and the week view grid is hard coded (like shown in the screenshot below):
image

So this PR adds a new class WeekDaysDividerSettings to control the styling for that divider, also includes a autoIndent parameter to prevent the divider from taking the entire width and indenting it to start from where the days row starts.

Result with autoIndent set to true (with some styles applied through the new settings):
image

Same result with autoIndent set to false:
image

This PR also removes the useless hardcoded border below the week days:
Before (autoIndent set to True):
image

After:
image

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

Closes #374 and #430

@PRBaraiya
Copy link
Collaborator

Hi @salahmak Please solve the conflicts in this PR.

@salahmak
Copy link
Author

salahmak commented Jan 7, 2025

@PRBaraiya Should be done

@salahmak
Copy link
Author

@PRBaraiya ??

- Added `weekendDays` parameter to `WeekView` to allow users to specify which days should be considered weekends.
- Default value for `weekendDays` is set to `[WeekDays.saturday, WeekDays.sunday]` for backward compatibility.
- Updated `_setWeekDays` method to dynamically remove user-specified weekend days when `showWeekends` is false.
- Removed hardcoded weekend days (Saturday and Sunday) to make the widget more flexible for different regional or user-specific configurations.
Add support for weekly recurring events that are fixed to weekdays:
- Create new WeeklyEvent class for day-of-week based scheduling
- Add WeeklyEvent to CalendarEventData conversion
- Define constant fixedWeekStart as base reference date
- Add helper method addWeeklyEvent to EventController

This allows creating events that repeat weekly without being tied to specific
calendar dates, useful for regular schedules and timetables.
Add scheduleMode parameter to WeekView widget that enforces a fixed week range:
- New boolean parameter scheduleMode (default: false)
- When enabled, locks minDay, maxDay, and initialDay to _fixedWeekStart range
- Add assertions to prevent setting different date ranges in schedule mode
- Update _setDateRange logic to handle schedule mode constraints

Complements WeeklyEvent by providing a view mode that displays events in a
fixed week context, ideal for viewing recurring schedules.
@salahmak salahmak closed this Feb 16, 2025
@shubham-jitiya-simform
Copy link

Hi, @salahmak
Please re-open PR that closes issue: #374 & #430.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to remove horizontal divder in timeline header and Timline start space

3 participants