I am trying top use styling in calendar to style the events in different colour based on selection.
I have started with the cuba sample app for calendar and added the css codes in styles.scss file but not sure what needs to be done to get working, thanks for your help.
my xml file content
<layout>
<calendar id="calendarWeekly"
captionProperty="caption"
datasource="tasksDs"
descriptionProperty="description"
endDate="2016-12-24"
endDateProperty="endDate"
height="100%"
isAllDayProperty="allDay"
startDate="2016-12-18"
startDateProperty="startDate"
stylenameProperty="styleName"
width="100%"/>
</layout>
Task Entity
public class Task extends StandardEntity {
private static final long serialVersionUID = -3453799426222595950L;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "EMPLOYEE_ID")
protected Employee employee;
@Column(name = "CAPTION", nullable = false)
protected String caption;
@Lob
@Column(name = "DESCRIPTION")
protected String description;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "START_DATE", nullable = false)
protected Date startDate;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "END_DATE", nullable = false)
protected Date endDate;
@Column(name = "ALL_DAY")
protected Boolean allDay;
@Column(name = "STYLE_NAME")
protected Integer styleName;
public CalendarStyle getStyleName() {
return styleName == null ? null : CalendarStyle.fromId(styleName);
}
public void setStyleName(CalendarStyle styleName) {
this.styleName = styleName == null ? null : styleName.getId();
}
....
I have attached the project zip file.
calendar-demo-master.zip (34.0M)