diff --git a/src/Squidex/app/framework/angular/date-time-editor.component.html b/src/Squidex/app/framework/angular/date-time-editor.component.html
index 2bc487744..d219753c9 100644
--- a/src/Squidex/app/framework/angular/date-time-editor.component.html
+++ b/src/Squidex/app/framework/angular/date-time-editor.component.html
@@ -6,6 +6,12 @@
+
+
+
+
+
+
diff --git a/src/Squidex/app/framework/angular/date-time-editor.component.scss b/src/Squidex/app/framework/angular/date-time-editor.component.scss
index 9c595c4d6..36eb04c92 100644
--- a/src/Squidex/app/framework/angular/date-time-editor.component.scss
+++ b/src/Squidex/app/framework/angular/date-time-editor.component.scss
@@ -35,6 +35,10 @@ $form-color: #fff;
}
.time-group {
+ & {
+ padding-right: .25rem;
+ }
+
.form-control {
width: 7.5rem;
}
diff --git a/src/Squidex/app/framework/angular/date-time-editor.component.ts b/src/Squidex/app/framework/angular/date-time-editor.component.ts
index 755bd2f1e..5b778964b 100644
--- a/src/Squidex/app/framework/angular/date-time-editor.component.ts
+++ b/src/Squidex/app/framework/angular/date-time-editor.component.ts
@@ -31,10 +31,6 @@ export class DateTimeEditorComponent implements ControlValueAccessor, OnInit, Af
private changeCallback: (value: any) => void = NOOP;
private touchedCallback: () => void = NOOP;
- public get showTime() {
- return this.mode === 'DateTime';
- }
-
public timeControl = new FormControl();
public dateControl = new FormControl();
@@ -45,6 +41,10 @@ export class DateTimeEditorComponent implements ControlValueAccessor, OnInit, Af
@Input()
public enforceTime: boolean;
+ public get showTime() {
+ return this.mode === 'DateTime';
+ }
+
public get hasValue() {
return this.dateValue !== null;
}
@@ -133,6 +133,16 @@ export class DateTimeEditorComponent implements ControlValueAccessor, OnInit, Af
this.touchedCallback();
}
+ public writeNow() {
+ this.writeValue(new Date().toUTCString());
+
+ this.updateControls();
+ this.updateValue();
+ this.touched();
+
+ return false;
+ }
+
public reset() {
this.timeControl.setValue(null, { emitEvent: false });
this.dateControl.setValue(null, { emitEvent: false });