Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Bug: Infinite recursion (browser freeze) when programmatically setting date fields in Dashboards / Dialogs | GoodFirstPicks

Bug: Infinite recursion (browser freeze) when programmatically setting date fields in Dashboards / Dialogs

frappe/frappe 1 comments 28d ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeFrappe / ERPNextPython

Why this is a good first issue

The issue involves a complex interaction between datepicker and FieldGroup, requiring careful handling of event triggers.

AI Summary

The issue describes an infinite recursion caused by the interaction between datepicker and FieldGroup when setting date fields programmatically. The fix requires modifying the event handling logic to prevent the loop. The maintainer has requested additional evidence, indicating uncertainty about the issue's prevalence.

Issue Description

Version

Frappe Version: (put your frappe version here, e.g. v16 develop )

{
	"frappe": "17.x.x-develop (f86fe79)",
	"erpnext": "17.x.x-develop (260fc6a)",
	"payments": "0.0.1",
	"hrms": "17.0.0-dev",
	"lending": "0.0.1",
	"cold_storage": "0.0.1"
}

Description

When a Date field's value is set programmatically (such as a Dashboard Filter Dialog loading previously saved custom dates), datepicker.selectDate() is called inside date.js.

However, datepicker.selectDate() subsequently calls the datepicker's onSelect callback, which triggers a DOM input change event: this.$input.trigger("change");.

Because the inputs are tracked by frappe.ui.FieldGroup, this change event causes the FieldGroup to instantly re-evaluate its dependencies and values, which eventually calls set_value and datepicker.selectDate() again. This creates an endless programmatic loop that instantly crashes/freezes the browser tab.

Steps to reproduce

  1. Create a "Report" Dashboard Chart (e.g. Net Movement Waterfall).
  2. Go to the dashboard, click the Filter button.
  3. Select a custom date range and save the filters.
  4. Hard Refresh the dashboard.
  5. The dashboard attempts to initialize the dialog with the saved date filters, causing an infinite loop in date.js and freezing the page.

Suggested Fix

The [date.js](cci:7://file:///home/frappe/frappe-bench/apps/frappe/frappe/public/js/frappe/form/controls/date.

GitHub Labels

bug

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!

Risk Flags

  • potential cross-cutting changes
  • requires understanding of event handling
Loading labels...

Details

Points20 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno
AssigneeKerollesFathy