Skip to content

Vendor patched copies of bootstrap-datepicker and daterangepicker files - #26010

Merged
maliming merged 2 commits into
devfrom
maliming/datepicker-cleanup
Aug 21, 2026
Merged

Vendor patched copies of bootstrap-datepicker and daterangepicker files#26010
maliming merged 2 commits into
devfrom
maliming/datepicker-cleanup

Conversation

@maliming

@maliming maliming commented Aug 18, 2026

Copy link
Copy Markdown
Member

Resolve #25970

Both libraries stay: the abp-date-picker tag helper API and its consumers are built on daterangepicker, and no maintained replacement is a drop-in. @abp/bootstrap-datepicker now ships its own copy of bootstrap-datepicker.js with jQuery.proxy replaced by Function.prototype.bind, and @abp/bootstrap-daterangepicker also vendors daterangepicker.css so it no longer depends on the unmaintained upstream package.

@maliming maliming added this to the 10.8-preview milestone Aug 18, 2026
@maliming
maliming requested a review from EngincanV August 21, 2026 01:52
@maliming
maliming marked this pull request as ready for review August 21, 2026 07:39
Copilot AI lite review requested due to automatic review settings August 21, 2026 07:39
@maliming
maliming merged commit 7d262a6 into dev Aug 21, 2026
2 checks passed
@maliming
maliming deleted the maliming/datepicker-cleanup branch August 21, 2026 07:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR vendors patched date-picker assets while preserving ABP’s existing APIs and improving jQuery 4 compatibility.

Changes:

  • Adds patched bootstrap-datepicker.js.
  • Vendors daterangepicker.css and updates package dependencies.
  • Updates resource mappings and MVC bundle paths.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Review summary
npm/packs/bootstrap-daterangepicker/src/daterangepicker.js No final review comments.
npm/packs/bootstrap-daterangepicker/src/daterangepicker.css No final review comments.
npm/packs/bootstrap-daterangepicker/package.json Moderate issue (2 votes): add @abp/jquery as a direct runtime dependency.
npm/packs/bootstrap-daterangepicker/abp.resourcemapping.js No final review comments.
npm/packs/bootstrap-datepicker/src/bootstrap-datepicker.js Moderate issue (2 votes): remove the && fromArgs guard so typed values emit change events.
npm/packs/bootstrap-datepicker/package.json Moderate issue (2 votes): add @abp/jquery explicitly. Critical issue (2 votes): refresh consumer locks or update package version/references.
npm/packs/bootstrap-datepicker/abp.resourcemapping.js No final review comments.
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/BootstrapDatepicker/BootstrapDatepickerScriptContributor.cs No final review comments.
Suppressed comments (2)

npm/packs/bootstrap-datepicker/src/bootstrap-datepicker.js:56

  • The time-tolerant comparison is one-sided: if a stored date is earlier than d by less than 24 hours, the negative difference fails the 0 <= check. Programmatic dates with a time component can therefore fail to match the same calendar day, causing incorrect active state and duplicate/toggle behavior; compare the absolute difference instead.
          if (0 <= this[i].valueOf() - val && this[i].valueOf() - val < 1000*60*60*24)

npm/packs/bootstrap-daterangepicker/src/daterangepicker.css:362

  • At desktop widths this rule forces every picker to LTR, but the vendored stylesheet omits the corresponding .daterangepicker.rtl direction, float, border, and padding overrides. The ABP initializer explicitly sets locale.direction to rtl for RTL cultures, so those calendars render with the wrong layout after this CSS replaces the upstream file. Preserve the upstream RTL media-query rules when copying the stylesheet.
  .daterangepicker {
    direction: ltr;
    text-align: left;
  }

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

},
"dependencies": {
"bootstrap-datepicker": "^1.10.1"
"bootstrap-datepicker": "1.10.1"
}
else if (this.dates.length){
// setting date by typing
if (String(oldDates) !== String(this.dates) && fromArgs) {
"dependencies": {
"@abp/moment": "~10.7.0-rc.3",
"bootstrap-daterangepicker": "^3.1.0"
"@abp/moment": "~10.7.0-rc.3"
"dependencies": {
"@abp/moment": "~10.7.0-rc.3",
"bootstrap-daterangepicker": "^3.1.0"
"@abp/moment": "~10.7.0-rc.3"
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 49.00%. Comparing base (3b702fa) to head (9416a0d).
⚠️ Report is 67 commits behind head on dev.

Files with missing lines Patch % Lines
...Datepicker/BootstrapDatepickerScriptContributor.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #26010      +/-   ##
==========================================
+ Coverage   48.99%   49.00%   +0.01%     
==========================================
  Files        3805     3815      +10     
  Lines      132259   132484     +225     
  Branches    10027    10038      +11     
==========================================
+ Hits        64796    64920     +124     
- Misses      65536    65616      +80     
- Partials     1927     1948      +21     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Evaluate a replacement for bootstrap-datepicker and bootstrap-daterangepicker

3 participants