Dashboards: Use ISO 8601 format for panel time range state (#115901)

date convertion
This commit is contained in:
Kristina Demeshchik
2026-01-06 14:29:58 -05:00
committed by GitHub
parent c0fe27406b
commit 29b04bd2ed
@@ -70,8 +70,8 @@ export class PanelTimeRange extends SceneTimeRangeTransformerBase<PanelTimeRange
// set initial values on activate
this.setState({
value: timeRange,
from: timeRange.raw.from.toString(),
to: timeRange.raw.to.toString(),
from: typeof timeRange.raw.from === 'string' ? timeRange.raw.from : timeRange.raw.from.toISOString(),
to: typeof timeRange.raw.to === 'string' ? timeRange.raw.to : timeRange.raw.to.toISOString(),
});
}