2
import Ubuntu.Components 0.1
4
import "dateExt.js" as DateExt
5
import "ViewType.js" as ViewType
11
property int type: ViewType.ViewTypeWeek
13
property var startDay: DateExt.today();
14
property bool isCurrentItem: false
16
signal dateSelected(var date);
21
model: type == ViewType.ViewTypeWeek ? 7 : 1
23
delegate: HeaderDateComponent{
24
date: startDay.addDays(index);
26
if( type == ViewType.ViewTypeWeek || (type == ViewType.ViewTypeDay && !root.isCurrentItem) ) {
34
if( type == ViewType.ViewTypeWeek && date.isSameDay(DateExt.today())){
36
} else if( type == ViewType.ViewTypeDay && header.isCurrentItem ) {
44
if( type == ViewType.ViewTypeWeek ) {
52
header.dateSelected(date);