View Issue Details

IDProjectCategoryView StatusLast Update
0036968mantisbtperformancepublic2026-04-10 13:15
Reporterraspopov Assigned Tocommunity  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.28.0 
Target Version2.29.0Fixed in Version2.29.0 
Summary0036968: Restricting DateTimePicker loading by pages that use it.
Description

It is proposed that the loading of the Bootstrap DateTimePicker.js and Moment.js libraries be restricted to only those pages that actually use them:

  • bug_actiongroup_page.php
  • bug_change_status_page.php
  • bug_report_page.php
  • bug_update_page.php
  • manage_proj_ver_edit_page.php
  • view.php
  • and MantisGraph plugin's pages/issues_trend_page.php
Additional Information

The same approach as in 0036967.

TagsNo tags attached.

Relationships

related to 0036967 resolvedcommunity Restricting Dropzone loading by pages that use it. 
related to 0037009 resolvedcommunity Add "today" button to DateTimePicker 

Activities

raspopov

raspopov

2026-03-13 10:51

reporter   ~0070866

PR: https://github.com/mantisbt/mantisbt/pull/2195

raspopov

raspopov

2026-04-09 12:54

reporter   ~0070955

I was able to limit script loading not only by page, but also by specific settings within each page.

Related Changesets

MantisBT: master fb0bfcf5

2026-03-13 10:48

raspopov

Committer: dregad


Details Diff
Restrict DateTimePicker loading to pages using it

New DateTimePicker API: datetimepicker_print() and
datetimepicker_get_field() functions.

Moved and fixed DateTimePicker and MantisGraph code from common.js to
datetimepicker-proxy.js and MantisGraph.js.

Added some missed <label> tags.

Fixes 0036968

Signed-off-by: Damien Regad <dregad@mantisbt.org>

Removed introduction of Today button (split to separate commit).
Affected Issues
0036968
mod - bug_actiongroup_page.php Diff File
mod - bug_change_status_page.php Diff File
mod - bug_report_page.php Diff File
mod - bug_update_page.php Diff File
add - core/datetimepicker_api.php Diff File
mod - core/layout_api.php Diff File
mod - js/common.js Diff File
add - js/datetimepicker-proxy.js Diff File
mod - manage_proj_ver_edit_page.php Diff File
mod - plugins/MantisGraph/core/Period.php Diff File
mod - plugins/MantisGraph/files/MantisGraph.js Diff File
mod - plugins/MantisGraph/pages/issues_trend_page.php Diff File
mod - view.php Diff File

MantisBT: master 5bad473b

2026-04-09 11:08

raspopov

Committer: dregad


Details Diff
Only load datetimepicker API when actually needed

Fixes 0036968

Signed-off-by: Damien Regad <dregad@mantisbt.org>

Reworded commit message
Affected Issues
0036968
mod - bug_actiongroup_page.php Diff File
mod - bug_change_status_page.php Diff File
mod - bug_report_page.php Diff File
mod - bug_update_page.php Diff File
mod - bug_view_inc.php Diff File
mod - view.php Diff File