mirror of
https://codeberg.org/vyn/selenite.git
synced 2025-07-03 01:53:18 +00:00
Various minor improvements
This commit is contained in:
parent
a2aeeea421
commit
00857b287f
4 changed files with 25 additions and 12 deletions
|
@ -8,6 +8,8 @@ export component VDatePicker inherits VLabeledComponent {
|
|||
in-out property<Date> date;
|
||||
in-out property<string> dateDisplay;
|
||||
|
||||
callback edited(Date);
|
||||
|
||||
pure function formatZeroPadding(number: int) -> string {
|
||||
if (number < 10) {
|
||||
return "0\{number}";
|
||||
|
@ -26,13 +28,14 @@ export component VDatePicker inherits VLabeledComponent {
|
|||
date.year = 0;
|
||||
date.month = 0;
|
||||
date.day = 0;
|
||||
root.edited(date);
|
||||
}
|
||||
|
||||
HorizontalLayout {
|
||||
VButton {
|
||||
text: getDateDisplay();
|
||||
enabled: root.enabled;
|
||||
clicked => { taskDateInput.show() }
|
||||
clicked => {taskDateInput.show() }
|
||||
}
|
||||
VActionButton {
|
||||
icon-svg: Svg.reset;
|
||||
|
@ -43,6 +46,9 @@ export component VDatePicker inherits VLabeledComponent {
|
|||
}
|
||||
|
||||
taskDateInput := DatePickerPopup {
|
||||
accepted(date) => { root.date = date }
|
||||
accepted(date) => {
|
||||
root.date = date;
|
||||
root.edited(date);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue