fix: allow negative numbers in grid search (#24989)

This commit is contained in:
Ankush Menat 2024-02-21 18:56:03 +05:30 committed by GitHub
parent dab06f33b1
commit 2dffcc08ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1569,7 +1569,7 @@ Object.assign(frappe.utils, {
only_allow_num_decimal(input) {
input.on("input", (e) => {
let self = $(e.target);
self.val(self.val().replace(/[^0-9.]/g, ""));
self.val(self.val().replace(/[^0-9.\-]/g, ""));
if (
(e.which != 46 || self.val().indexOf(".") != -1) &&
(e.which < 48 || e.which > 57)