Vendor patched copies of bootstrap-datepicker and daterangepicker files - #26010
Conversation
There was a problem hiding this comment.
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.cssand 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
dby less than 24 hours, the negative difference fails the0 <=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.rtldirection, float, border, and padding overrides. The ABP initializer explicitly setslocale.directiontortlfor 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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
Resolve #25970
Both libraries stay: the
abp-date-pickertag helper API and its consumers are built on daterangepicker, and no maintained replacement is a drop-in.@abp/bootstrap-datepickernow ships its own copy ofbootstrap-datepicker.jswithjQuery.proxyreplaced byFunction.prototype.bind, and@abp/bootstrap-daterangepickeralso vendorsdaterangepicker.cssso it no longer depends on the unmaintained upstream package.