pinpoint-apm/pinpoint · warning
Out of date range.
Error message
Out of date range.
What it means
Not a thrown exception but a user-facing toast (outOfDateRangeMessage) emitted by DatetimePicker's onChange. When the user-picked date range passes isValidDateRange(maxDateRangeDays) but exceeds the picker's maxDateRangeDays limit, the change is rejected, a warning toast is shown, and the input is reset to the previously valid range.
Solutions
- Choose a date range whose length is at most maxDateRangeDays.
- Raise the maxDateRangeDays prop passed by the host application if the limit is too restrictive.
- Use the Relative quick-select times (e.g. '1d', '2days') which fit within the allowed range.
- In tests/custom integrations, pre-validate the range with isValidDateRange(maxDateRangeDays) before calling onChange.
Example fix
// before
onChange={(dateRange) => handleChange?.(genDateState(dateRange[0], dateRange[1], timezone))}
// after
const range = { from: dateRange[0], to: dateRange[1] };
if (isValidDateRange(maxDateRangeDays)(range)) {
handleChange?.(genDateState(range.from, range.to, timezone));
} Defensive patterns
Strategy: validation
Validate before calling
import { isValidDateRange } from '@pinpoint/ui/utils';
const range = { from: dateRange[0], to: dateRange[1] };
if (range.from && range.to && isValidDateRange(maxDateRangeDays)(range)) {
handleChange?.(genDateState(range.from, range.to, timezone));
} Type guard
function isCompleteRange(r) {
return r?.from instanceof Date && r?.to instanceof Date;
} Prevention
- Pre-validate ranges with isValidDateRange(maxDateRangeDays) before applying them.
- Set a maxDateRangeDays that matches real user workflows.
- Prefer the Relative quick-select options, which are within the limit.
When it happens
Trigger: User manually types or selects a from/to range in the RichDatetimePicker whose length exceeds maxDateRangeDays; onChange computes isWithinMaxRange=false and shows the toast while restoring the prior input text.
Common situations: Selecting a range wider than the configured maximum (e.g. > maxDateRangeDays set by the host app); typing a large date span by hand; a host page configured a small maxDateRangeDays so ordinary ranges are rejected.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- agentInfoRefreshIntervalMs must be greater than 0
- agentInfoSendIntervalMs must be greater than 0
- annotationKey name must not be empty
- customMetricName must consist of
- Either tagGroupList or fieldNameList must have a size of…
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/6885e6e3d7fd5eec.
Report an issue: GitHub.
Appendix: source
Thrown at web-frontend/src/main/v3/packages/ui/src/components/DatetimePicker/DatetimePicker.tsx:162
dateFormat={dateFormat}
disable={isRealtime}
className="w-104"
seamToken="~"
localeKey={language}
startDate={parsedDate.from}
endDate={parsedDate.to}
minDate={subYears(new Date(), 5)}
displayedInput={input}
onChange={(dateRange, text = '') => {
if (dateRange[0] && dateRange[1]) {
const isWithinMaxRange = isValidDateRange(maxDateRangeDays)({
from: dateRange[0],
to: dateRange[1],
});
if (isWithinMaxRange) {
handleChange?.(genDateState(dateRange[0], dateRange[1], timezone), text);
} else {
toast.warn(outOfDateRangeMessage);
const prarsedPrevDate = getParsedDateRange({ from, to }, () => true);
const formattedDateRange = getFormattedDateRange({
from: prarsedPrevDate.from,
to: prarsedPrevDate.to,
});
setInput(`${formattedDateRange.from} ~ ${formattedDateRange.to}`);
}
}
}}
customTimes={{
Relative: ['45m', '12hours', '1d', '2days', 'yesterday', 'today'],
}}
validateDatePickerRange={([from, to]) => {
if (from && to) {
if (subDays(to, maxDateRangeDays) > from) {
toast.warn(outOfDateRangeMessage);
return false;
} else {View on GitHub (pinned to 744c3d3075)