-
Notifications
You must be signed in to change notification settings - Fork 2
Worktime calendar
Working week representation in calendar manner.
Inherits from RecyclerView/UICollectionView.
Type | Field | Description | Default value |
---|---|---|---|
FontStyleItem | DayFontStyle | Responsible for day font customization. | |
FontStyleItem | TitleFontStyle | Responsible for title font customization. | |
FontStyleItem | CurrentDayFontStyle | Responsible for day font customization for current weekday. | |
WeekStartEnum | WeekStart | Responsible for the first working day. | Sunday |
UIFont TypeFace |
TitleFont | Responsible for the font of the day title. |
System Roboto bold |
UIColor Color |
TitleColor | Responsible for the color of the day title. | #343334 |
float int |
TitleTextSize | Responsible for the text size of the day title. | 13 |
UIFont TypeFace |
DayTextFont | Responsible for the text font, which will use for the time labels. |
System Roboto bold |
float int |
DayTextSize | Responsible for the size of text, which will use for the time labels. | 11 |
UIColor Color |
DayTextColor | Responsible for the color of text, which will use for the time labels. | #777677 |
UIColor Color |
CurrentDividerColor | Responsible for the color of title and day dividers. | #EAEAEA |
UIColor Color |
CurrentDayBackgroundColor | Responsible for the background color of the current day. | #3C6DF0 |
UIColor Color |
CurrentDayTextColor | Responsible for the text color for the current day. | #FFFFFF |
UIColor Color |
DayEvenBackgroundColor | Responsible for the background color of the even days. | #F6F6F6 |
UIColor Color |
ColorDividers | Responsible for the color of the day and title dividers, for the current day. | #EAEAEA |
IEnumerable <WorkTimeCalendarItem> | Items | Collection with schedule data for every working day. Must contain 7 days only, in other cases, you will see an exception. |
TimeSpan StartTime - time, when work should begin.
TimeSpan EndTime - time, when work should end.
TimeSpan BreakStartTime - time, when the break should begin.
TimeSpan BreakEndTime - time, when the break should end.
DayOfWeek WeekDay - current weekday.
string ShortWeekDay - short (2 symbols) name of the current weekday.
bool IsDayOff - set true for not working days.
bool HasBreak - indicates about break in a current working day.
Fills all possible width.
For customization on Android platform use WorkTime component. There included all customization fields.
Sample for creating WorkTime in .axml markup for Android:
<EOS.UI.Droid.Components.WorkTime
android:id="@+id/workTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
For iOS WorktimeCalendar can be added from the .xib/storyboards files or from code behind.
The sample for creating WorktimeCalendar in code behind for IOS:
var worktimeCalendar = new WorkTimeCalendarCollection(new CoreGraphics.CGRect(0, 0, UIScreen.MainScreen.Bounds.Width, 320));
var dataSource = CreateSchedule();
var _source = (WorkTimeCalendarCollectionSource)worktimeCalendar.Source;
_source.CalendarModel.Items = dataSource;
worktimeCalendar.Source = _source;
View.AddSubview(worktimeCalendar);
For work simplifying of WorkTimeCalendar customization, you can find WorkTimeCalendarModel class in the EOS.UI.iOS/Models namespace. This class includes all customization fields and inherits IEOSThemeControl. You should use this class for any customization. Also, you can find WorkTimeCalendarCollectionSource it's our own collection source which adapted for using WorkTimeCalendarModel. WorkTimeCalendarCollectionSource contains WorkTimeCalendarModel in CalendarModel Field.