43
43
property bool isEdit: false
45
45
onStartDateChanged: {
46
startDateInput.text = startDate.toLocaleDateString();
47
startTimeInput.text = Qt.formatTime(startDate);
46
startDateTimeInput.dateTime = startDate;
48
47
adjustEndDateToStartDate()
51
50
onEndDateChanged: {
52
endDateInput.text = endDate.toLocaleDateString();
53
endTimeInput.text = Qt.formatTime(endDate);
51
endDateTimeInput.dateTime = endDate;
56
54
head.actions: Action {
229
227
return daysOfWeek;
232
function openDatePicker (element, caller, callerProperty, mode) {
233
element.highlighted = true;
234
var picker = PickerPanel.openDatePicker(caller, callerProperty, mode);
236
picker.closed.connect(function () {
237
element.highlighted = false;
241
230
// Calucate default hour and minute for start and end time on event
242
231
function roundDate(date) {
243
232
var tempDate = new Date(date)
337
326
width: parent.width
340
text: i18n.tr("From")
350
height: startDateInput.height
354
objectName: "startDateInput"
357
anchors.left: parent.left
358
width: allDayEventCheckbox.checked ? parent.width : 4 * parent.width / 5
362
onClicked: openDatePicker(startDateInput, root, "startDate", "Years|Months|Days")
368
objectName: "startTimeInput"
371
anchors.right: parent.right
372
width: parent.width / 5
373
visible: !allDayEventCheckbox.checked
374
horizontalAlignment: Text.AlignRight
378
onClicked: openDatePicker(startTimeInput, root, "startDate", "Hours|Minutes")
394
height: endDateInput.height
398
objectName: "endDateInput"
401
anchors.left: parent.left
402
width: allDayEventCheckbox.checked ? parent.width : 4 * parent.width / 5
406
onClicked: openDatePicker(endDateInput, root, "endDate", "Years|Months|Days")
412
objectName: "endTimeInput"
414
width: parent.width / 5
415
visible: !allDayEventCheckbox.checked
416
anchors.right: parent.right
417
horizontalAlignment: Text.AlignRight
421
onClicked: openDatePicker(endTimeInput, root, "endDate", "Hours|Minutes")
329
id: startDateTimeInput
330
header: i18n.tr("From")
331
showTimePicker: !allDayEventCheckbox.checked
337
startDate = dateTime;
343
header: i18n.tr("To")
344
showTimePicker: !allDayEventCheckbox.checked
676
604
Qt.inputMethod.hide()
677
605
titleEdit.focus = false
678
606
locationEdit.focus = false
679
startDateInput.focus = false
680
startTimeInput.focus = false
681
endDateInput.focus = false
682
endTimeInput.focus = false
607
startDateTimeInput.clearFocus();
608
endDateTimeInput.clearFocus();
683
609
messageEdit.focus = false