-import QtQuick 1.0
+import QtQuick 1.1
+
+import "../../LichViet/main.js" as Script
Item {
id: container
// Spacing between items
property int spacing: 8
- property Component itemBackground: Component {
- BorderImage {
- border { top: 8; bottom: 8; left: 8; right: 8 }
- source: theme_manager.theme.datepicker.button
- }
- }
- property Component itemBackgroundPressed: Component {
- BorderImage {
- border { top: 8; bottom: 8; left: 8; right: 8 }
- source: theme_manager.theme.datepicker.button_pressed
- }
- }
width: 240
height: 90
fontColor: container.fontColor
fontName: container.fontName
fontSize: container.fontSize
- bg: itemBackground
- bgPressed: itemBackgroundPressed
opacity: (index+1 < days.start || index+1 > days.end) ? 0.5 : 1.0
}
}
fontColor: container.fontColor
fontName: container.fontName
fontSize: container.fontSize
- bg: itemBackground
- bgPressed: itemBackgroundPressed
}
}
fontColor: container.fontColor
fontName: container.fontName
fontSize: container.fontSize
- bg: itemBackground
- bgPressed: itemBackgroundPressed
}
}
Component.onCompleted: {
appends()
- day.index = screen.curDay - 1
- end = LC.calDays(month.index+1,year.index+1900);
+ day.index = Script.curDay - 1
+ end = Script.calDaysX(month.index+1,year.index+1900);
}
function reset(){
- var howmanydays = LC.calDays(month.index+1,year.index+1900);
+ var howmanydays = Script.calDaysX(month.index+1,year.index+1900);
end = howmanydays;
if (day.index+1 < days.start) day.index = days.start-1;
}
function change(){
- day.index = screen.curDay-1;
+ day.index = Script.curDay-1;
}
}
else
append({number:j})
}
- month.index = screen.curMonth - 1
+ month.index = Script.curMonth - 1
}
function change(){
- month.index = screen.curMonth - 1;
+ month.index = Script.curMonth - 1;
}
}
for(var i=1900;i<2099;i++){
append({number:i})
}
- year.index = screen.curYear - 1900
+ year.index = Script.curYear - 1900
}
function change(){
- year.index = screen.curYear - 1900
+ year.index = Script.curYear - 1900
}
}
function day_reset(){
- datePicker.mDay = screen.curDay
+ datePicker.mDay = Script.curDay
days.change()
}
function month_reset(){
- datePicker.mMonth = screen.curMonth
+ datePicker.mMonth = Script.curMonth
months.change()
}
function year_reset(){
- datePicker.mYear = screen.curYear
+ datePicker.mYear = Script.curYear
years.change()
}