Skip to content

Commit 86c1eea

Browse files
committed
Today
1 parent 86869e1 commit 86c1eea

File tree

1 file changed

+3
-8
lines changed
  • services/static-webserver/client/source/class/osparc/desktop/credits

1 file changed

+3
-8
lines changed

services/static-webserver/client/source/class/osparc/desktop/credits/DateFilters.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,20 @@ qx.Class.define("osparc.desktop.credits.DateFilters", {
2222
_buildLayout() {
2323
this._removeAll();
2424

25+
// Range defaults: today
2526
const defaultFrom = new Date();
26-
// Range defaults
27-
// from last 24h...
28-
defaultFrom.setDate(defaultFrom.getDate() - 1);
29-
// .. to now
3027
const defaultTo = new Date();
3128

3229
this.__from = this.__addDateInput("From", defaultFrom);
3330
this.__until = this.__addDateInput("Until", defaultTo);
3431

35-
const lastDayBtn = new qx.ui.form.Button("Last 24h").set({
32+
const lastDayBtn = new qx.ui.form.Button("Today").set({
3633
allowStretchY: false,
3734
alignY: "bottom"
3835
});
3936
lastDayBtn.addListener("execute", () => {
4037
const today = new Date();
41-
const last24h = new Date(today);
42-
last24h.setDate(today.getDate() - 1);
43-
this.__from.setValue(last24h);
38+
this.__from.setValue(today);
4439
this.__until.setValue(today);
4540
});
4641
this._add(lastDayBtn);

0 commit comments

Comments
 (0)