You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ui5-dynamic-date-range): implement date time from to options (#12312)
Introduce new “date-time” options for the UI5 Dynamic Date Range component. This feature expands the existing set of options by enabling date + time selection, including:
A new FromDateTime option (start date + time)
A new ToDateTime option (end date + time)
Parsing / formatting support for date/time values
* - "TOMORROW" - Represents the next date. An example value is `{ operator: "TOMORROW"}`. Import: `import "@ui5/webcomponents/dist/dynamic-date-range-options/Tomorrow.js";`
106
107
* - "DATE" - Represents a single date. An example value is `{ operator: "DATE", values: [new Date()]}`. Import: `import "@ui5/webcomponents/dist/dynamic-date-range-options/SingleDate.js";`
107
108
* - "DATERANGE" - Represents a range of dates. An example value is `{ operator: "DATERANGE", values: [new Date(), new Date()]}`. Import: `import "@ui5/webcomponents/dist/dynamic-date-range-options/DateRange.js";`
109
+
* - "FROMDATETIME" - Represents a range from date and time. An example value is `{ operator: "FROMDATETIME", values: [new Date()]}`. Import: `import "@ui5/webcomponents/dist/dynamic-date-range-options/FromDateTime.js";`
110
+
* - "TODATETIME" - Represents a range to date and time. An example value is `{ operator: "TODATETIME", values: [new Date()]}`. Import: `import "@ui5/webcomponents/dist/dynamic-date-range-options/ToDateTime.js";`
108
111
* - "LASTDAYS" - Represents Last X Days from today. An example value is `{ operator: "LASTDAYS", values: [2]}`. Import: `import "@ui5/webcomponents/dist/dynamic-date-range-options/LastOptions.js";`
109
112
* - "LASTWEEKS" - Represents Last X Weeks from today. An example value is `{ operator: "LASTWEEKS", values: [3]}`. Import: `import "@ui5/webcomponents/dist/dynamic-date-range-options/LastOptions.js";`
110
113
* - "LASTMONTHS" - Represents Last X Months from today. An example value is `{ operator: "LASTMONTHS", values: [6]}`. Import: `import "@ui5/webcomponents/dist/dynamic-date-range-options/LastOptions.js";`
@@ -285,7 +288,7 @@ class DynamicDateRange extends UI5Element {
285
288
286
289
_togglePicker(): void{
287
290
if(this.open){
288
-
this.open=false;
291
+
this._close();
289
292
}else{
290
293
this.open=true;
291
294
}
@@ -390,11 +393,15 @@ class DynamicDateRange extends UI5Element {
390
393
this.value=undefined;
391
394
}
392
395
396
+
this._currentOption?.resetState?.();
397
+
393
398
this._currentOption=undefined;
394
399
this.open=false;
395
400
}
396
401
397
402
_close(){
403
+
this._currentOption?.resetState?.();
404
+
398
405
this._currentOption=undefined;
399
406
this.open=false;
400
407
}
@@ -432,7 +439,12 @@ class DynamicDateRange extends UI5Element {
0 commit comments