added a datepicker fix
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/*! X-editable-bootstrap5 - v1.5.4
|
/*! X-editable-bootstrap5 - v1.5.5
|
||||||
* A maintained fork of x-editable for Bootstrap 5 support.
|
* A maintained fork of x-editable for Bootstrap 5 support.
|
||||||
* https://git.24unix.net/tracer/x-editable
|
* https://git.24unix.net/tracer/x-editable
|
||||||
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
||||||
|
|||||||
46
dist/bootstrap-editable/js/bootstrap-editable.js
vendored
46
dist/bootstrap-editable/js/bootstrap-editable.js
vendored
@@ -1,4 +1,4 @@
|
|||||||
/*! X-editable-bootstrap5 - v1.5.4
|
/*! X-editable-bootstrap5 - v1.5.5
|
||||||
* A maintained fork of x-editable for Bootstrap 5 support.
|
* A maintained fork of x-editable for Bootstrap 5 support.
|
||||||
* https://git.24unix.net/tracer/x-editable
|
* https://git.24unix.net/tracer/x-editable
|
||||||
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
||||||
@@ -3881,20 +3881,26 @@ $(function(){
|
|||||||
this.$input.val(value).trigger('change.select2');
|
this.$input.val(value).trigger('change.select2');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
input2value: function() {
|
input2value: function() {
|
||||||
var val = this.$input.val();
|
var val = this.$input.val();
|
||||||
|
|
||||||
// For Select2 v4.x, ensure we get the actual selected value
|
// --- Handle Bootstrap Datepicker ---
|
||||||
if (this.$input.data('select2')) {
|
var dp = this.$input.data('datepicker');
|
||||||
var selectedData = this.$input.select2('data');
|
if (dp && typeof dp.getFormattedDate === 'function') {
|
||||||
if (selectedData && selectedData.length > 0) {
|
val = dp.getFormattedDate(this.options.format || 'yyyy-mm-dd');
|
||||||
val = this.isMultiple ? selectedData.map(function(item) { return item.id; }) : selectedData[0].id;
|
}
|
||||||
}
|
|
||||||
}
|
// --- Handle Select2 v4.x ---
|
||||||
|
if (this.$input.data('select2')) {
|
||||||
return val;
|
var selectedData = this.$input.select2('data');
|
||||||
},
|
if (selectedData && selectedData.length > 0) {
|
||||||
|
val = this.isMultiple ? selectedData.map(function(item) { return item.id; }) : selectedData[0].id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return val;
|
||||||
|
},
|
||||||
|
|
||||||
str2value: function(str, separator) {
|
str2value: function(str, separator) {
|
||||||
if(typeof str !== 'string' || !this.isMultiple) {
|
if(typeof str !== 'string' || !this.isMultiple) {
|
||||||
@@ -5017,9 +5023,13 @@ $(function(){
|
|||||||
this.$input.bdatepicker('update', value);
|
this.$input.bdatepicker('update', value);
|
||||||
},
|
},
|
||||||
|
|
||||||
input2value: function() {
|
input2value: function() {
|
||||||
return this.$input.data('datepicker').date;
|
const dp = this.$input.data('datepicker');
|
||||||
},
|
if (dp && typeof dp.getFormattedDate === 'function') {
|
||||||
|
return dp.getFormattedDate(this.options.format || 'yyyy-mm-dd');
|
||||||
|
}
|
||||||
|
return this.$input.val();
|
||||||
|
},
|
||||||
|
|
||||||
activate: function() {
|
activate: function() {
|
||||||
},
|
},
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
|||||||
/*! X-editable-bootstrap5 - v1.5.4
|
/*! X-editable-bootstrap5 - v1.5.5
|
||||||
* A maintained fork of x-editable for Bootstrap 5 support.
|
* A maintained fork of x-editable for Bootstrap 5 support.
|
||||||
* https://git.24unix.net/tracer/x-editable
|
* https://git.24unix.net/tracer/x-editable
|
||||||
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*! X-editable-bootstrap5 - v1.5.4
|
/*! X-editable-bootstrap5 - v1.5.5
|
||||||
* A maintained fork of x-editable for Bootstrap 5 support.
|
* A maintained fork of x-editable for Bootstrap 5 support.
|
||||||
* https://git.24unix.net/tracer/x-editable
|
* https://git.24unix.net/tracer/x-editable
|
||||||
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
||||||
@@ -3881,20 +3881,26 @@ $(function(){
|
|||||||
this.$input.val(value).trigger('change.select2');
|
this.$input.val(value).trigger('change.select2');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
input2value: function() {
|
input2value: function() {
|
||||||
var val = this.$input.val();
|
var val = this.$input.val();
|
||||||
|
|
||||||
// For Select2 v4.x, ensure we get the actual selected value
|
// --- Handle Bootstrap Datepicker ---
|
||||||
if (this.$input.data('select2')) {
|
var dp = this.$input.data('datepicker');
|
||||||
var selectedData = this.$input.select2('data');
|
if (dp && typeof dp.getFormattedDate === 'function') {
|
||||||
if (selectedData && selectedData.length > 0) {
|
val = dp.getFormattedDate(this.options.format || 'yyyy-mm-dd');
|
||||||
val = this.isMultiple ? selectedData.map(function(item) { return item.id; }) : selectedData[0].id;
|
}
|
||||||
}
|
|
||||||
}
|
// --- Handle Select2 v4.x ---
|
||||||
|
if (this.$input.data('select2')) {
|
||||||
return val;
|
var selectedData = this.$input.select2('data');
|
||||||
},
|
if (selectedData && selectedData.length > 0) {
|
||||||
|
val = this.isMultiple ? selectedData.map(function(item) { return item.id; }) : selectedData[0].id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return val;
|
||||||
|
},
|
||||||
|
|
||||||
str2value: function(str, separator) {
|
str2value: function(str, separator) {
|
||||||
if(typeof str !== 'string' || !this.isMultiple) {
|
if(typeof str !== 'string' || !this.isMultiple) {
|
||||||
@@ -5085,9 +5091,13 @@ $(function(){
|
|||||||
this.$input.bdatepicker('update', value);
|
this.$input.bdatepicker('update', value);
|
||||||
},
|
},
|
||||||
|
|
||||||
input2value: function() {
|
input2value: function() {
|
||||||
return this.$input.data('datepicker').date;
|
const dp = this.$input.data('datepicker');
|
||||||
},
|
if (dp && typeof dp.getFormattedDate === 'function') {
|
||||||
|
return dp.getFormattedDate(this.options.format || 'yyyy-mm-dd');
|
||||||
|
}
|
||||||
|
return this.$input.val();
|
||||||
|
},
|
||||||
|
|
||||||
activate: function() {
|
activate: function() {
|
||||||
},
|
},
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
|||||||
/*! X-editable-bootstrap5 - v1.5.4
|
/*! X-editable-bootstrap5 - v1.5.5
|
||||||
* A maintained fork of x-editable for Bootstrap 5 support.
|
* A maintained fork of x-editable for Bootstrap 5 support.
|
||||||
* https://git.24unix.net/tracer/x-editable
|
* https://git.24unix.net/tracer/x-editable
|
||||||
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*! X-editable-bootstrap5 - v1.5.4
|
/*! X-editable-bootstrap5 - v1.5.5
|
||||||
* A maintained fork of x-editable for Bootstrap 5 support.
|
* A maintained fork of x-editable for Bootstrap 5 support.
|
||||||
* https://git.24unix.net/tracer/x-editable
|
* https://git.24unix.net/tracer/x-editable
|
||||||
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
||||||
@@ -3881,20 +3881,26 @@ $(function(){
|
|||||||
this.$input.val(value).trigger('change.select2');
|
this.$input.val(value).trigger('change.select2');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
input2value: function() {
|
input2value: function() {
|
||||||
var val = this.$input.val();
|
var val = this.$input.val();
|
||||||
|
|
||||||
// For Select2 v4.x, ensure we get the actual selected value
|
// --- Handle Bootstrap Datepicker ---
|
||||||
if (this.$input.data('select2')) {
|
var dp = this.$input.data('datepicker');
|
||||||
var selectedData = this.$input.select2('data');
|
if (dp && typeof dp.getFormattedDate === 'function') {
|
||||||
if (selectedData && selectedData.length > 0) {
|
val = dp.getFormattedDate(this.options.format || 'yyyy-mm-dd');
|
||||||
val = this.isMultiple ? selectedData.map(function(item) { return item.id; }) : selectedData[0].id;
|
}
|
||||||
}
|
|
||||||
}
|
// --- Handle Select2 v4.x ---
|
||||||
|
if (this.$input.data('select2')) {
|
||||||
return val;
|
var selectedData = this.$input.select2('data');
|
||||||
},
|
if (selectedData && selectedData.length > 0) {
|
||||||
|
val = this.isMultiple ? selectedData.map(function(item) { return item.id; }) : selectedData[0].id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return val;
|
||||||
|
},
|
||||||
|
|
||||||
str2value: function(str, separator) {
|
str2value: function(str, separator) {
|
||||||
if(typeof str !== 'string' || !this.isMultiple) {
|
if(typeof str !== 'string' || !this.isMultiple) {
|
||||||
@@ -4951,9 +4957,13 @@ $(function(){
|
|||||||
this.$input.bdatepicker('update', value);
|
this.$input.bdatepicker('update', value);
|
||||||
},
|
},
|
||||||
|
|
||||||
input2value: function() {
|
input2value: function() {
|
||||||
return this.$input.data('datepicker').date;
|
const dp = this.$input.data('datepicker');
|
||||||
},
|
if (dp && typeof dp.getFormattedDate === 'function') {
|
||||||
|
return dp.getFormattedDate(this.options.format || 'yyyy-mm-dd');
|
||||||
|
}
|
||||||
|
return this.$input.val();
|
||||||
|
},
|
||||||
|
|
||||||
activate: function() {
|
activate: function() {
|
||||||
},
|
},
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
dist/jquery-editable/css/jquery-editable.css
vendored
2
dist/jquery-editable/css/jquery-editable.css
vendored
@@ -1,4 +1,4 @@
|
|||||||
/*! X-editable-bootstrap5 - v1.5.4
|
/*! X-editable-bootstrap5 - v1.5.5
|
||||||
* A maintained fork of x-editable for Bootstrap 5 support.
|
* A maintained fork of x-editable for Bootstrap 5 support.
|
||||||
* https://git.24unix.net/tracer/x-editable
|
* https://git.24unix.net/tracer/x-editable
|
||||||
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*! X-editable-bootstrap5 - v1.5.4
|
/*! X-editable-bootstrap5 - v1.5.5
|
||||||
* A maintained fork of x-editable for Bootstrap 5 support.
|
* A maintained fork of x-editable for Bootstrap 5 support.
|
||||||
* https://git.24unix.net/tracer/x-editable
|
* https://git.24unix.net/tracer/x-editable
|
||||||
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
||||||
@@ -3881,20 +3881,26 @@ $(function(){
|
|||||||
this.$input.val(value).trigger('change.select2');
|
this.$input.val(value).trigger('change.select2');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
input2value: function() {
|
input2value: function() {
|
||||||
var val = this.$input.val();
|
var val = this.$input.val();
|
||||||
|
|
||||||
// For Select2 v4.x, ensure we get the actual selected value
|
// --- Handle Bootstrap Datepicker ---
|
||||||
if (this.$input.data('select2')) {
|
var dp = this.$input.data('datepicker');
|
||||||
var selectedData = this.$input.select2('data');
|
if (dp && typeof dp.getFormattedDate === 'function') {
|
||||||
if (selectedData && selectedData.length > 0) {
|
val = dp.getFormattedDate(this.options.format || 'yyyy-mm-dd');
|
||||||
val = this.isMultiple ? selectedData.map(function(item) { return item.id; }) : selectedData[0].id;
|
}
|
||||||
}
|
|
||||||
}
|
// --- Handle Select2 v4.x ---
|
||||||
|
if (this.$input.data('select2')) {
|
||||||
return val;
|
var selectedData = this.$input.select2('data');
|
||||||
},
|
if (selectedData && selectedData.length > 0) {
|
||||||
|
val = this.isMultiple ? selectedData.map(function(item) { return item.id; }) : selectedData[0].id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return val;
|
||||||
|
},
|
||||||
|
|
||||||
str2value: function(str, separator) {
|
str2value: function(str, separator) {
|
||||||
if(typeof str !== 'string' || !this.isMultiple) {
|
if(typeof str !== 'string' || !this.isMultiple) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
|||||||
/*! X-editable-bootstrap5 - v1.5.4
|
/*! X-editable-bootstrap5 - v1.5.5
|
||||||
* A maintained fork of x-editable for Bootstrap 5 support.
|
* A maintained fork of x-editable for Bootstrap 5 support.
|
||||||
* https://git.24unix.net/tracer/x-editable
|
* https://git.24unix.net/tracer/x-editable
|
||||||
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
||||||
|
|||||||
36
dist/jqueryui-editable/js/jqueryui-editable.js
vendored
36
dist/jqueryui-editable/js/jqueryui-editable.js
vendored
@@ -1,4 +1,4 @@
|
|||||||
/*! X-editable-bootstrap5 - v1.5.4
|
/*! X-editable-bootstrap5 - v1.5.5
|
||||||
* A maintained fork of x-editable for Bootstrap 5 support.
|
* A maintained fork of x-editable for Bootstrap 5 support.
|
||||||
* https://git.24unix.net/tracer/x-editable
|
* https://git.24unix.net/tracer/x-editable
|
||||||
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
* Copyright (c) 2025 Micha Espey; Licensed MIT */
|
||||||
@@ -3881,20 +3881,26 @@ $(function(){
|
|||||||
this.$input.val(value).trigger('change.select2');
|
this.$input.val(value).trigger('change.select2');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
input2value: function() {
|
input2value: function() {
|
||||||
var val = this.$input.val();
|
var val = this.$input.val();
|
||||||
|
|
||||||
// For Select2 v4.x, ensure we get the actual selected value
|
// --- Handle Bootstrap Datepicker ---
|
||||||
if (this.$input.data('select2')) {
|
var dp = this.$input.data('datepicker');
|
||||||
var selectedData = this.$input.select2('data');
|
if (dp && typeof dp.getFormattedDate === 'function') {
|
||||||
if (selectedData && selectedData.length > 0) {
|
val = dp.getFormattedDate(this.options.format || 'yyyy-mm-dd');
|
||||||
val = this.isMultiple ? selectedData.map(function(item) { return item.id; }) : selectedData[0].id;
|
}
|
||||||
}
|
|
||||||
}
|
// --- Handle Select2 v4.x ---
|
||||||
|
if (this.$input.data('select2')) {
|
||||||
return val;
|
var selectedData = this.$input.select2('data');
|
||||||
},
|
if (selectedData && selectedData.length > 0) {
|
||||||
|
val = this.isMultiple ? selectedData.map(function(item) { return item.id; }) : selectedData[0].id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return val;
|
||||||
|
},
|
||||||
|
|
||||||
str2value: function(str, separator) {
|
str2value: function(str, separator) {
|
||||||
if(typeof str !== 'string' || !this.isMultiple) {
|
if(typeof str !== 'string' || !this.isMultiple) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@
|
|||||||
"name": "x-editable-bootstrap5",
|
"name": "x-editable-bootstrap5",
|
||||||
"title": "X-editable-bootstrap5",
|
"title": "X-editable-bootstrap5",
|
||||||
"description": "A maintained fork of x-editable for Bootstrap 5 support.",
|
"description": "A maintained fork of x-editable for Bootstrap 5 support.",
|
||||||
"version": "1.5.4",
|
"version": "1.5.5",
|
||||||
"homepage": "https://git.24unix.net/tracer/x-editable",
|
"homepage": "https://git.24unix.net/tracer/x-editable",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Micha Espey",
|
"name": "Micha Espey",
|
||||||
|
|||||||
@@ -114,9 +114,13 @@ $(function(){
|
|||||||
this.$input.bdatepicker('update', value);
|
this.$input.bdatepicker('update', value);
|
||||||
},
|
},
|
||||||
|
|
||||||
input2value: function() {
|
input2value: function() {
|
||||||
return this.$input.data('datepicker').date;
|
const dp = this.$input.data('datepicker');
|
||||||
},
|
if (dp && typeof dp.getFormattedDate === 'function') {
|
||||||
|
return dp.getFormattedDate(this.options.format || 'yyyy-mm-dd');
|
||||||
|
}
|
||||||
|
return this.$input.val();
|
||||||
|
},
|
||||||
|
|
||||||
activate: function() {
|
activate: function() {
|
||||||
},
|
},
|
||||||
|
|||||||
34
src/inputs/select2/select2.js
vendored
34
src/inputs/select2/select2.js
vendored
@@ -280,20 +280,26 @@ $(function(){
|
|||||||
this.$input.val(value).trigger('change.select2');
|
this.$input.val(value).trigger('change.select2');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
input2value: function() {
|
input2value: function() {
|
||||||
var val = this.$input.val();
|
var val = this.$input.val();
|
||||||
|
|
||||||
// For Select2 v4.x, ensure we get the actual selected value
|
// --- Handle Bootstrap Datepicker ---
|
||||||
if (this.$input.data('select2')) {
|
var dp = this.$input.data('datepicker');
|
||||||
var selectedData = this.$input.select2('data');
|
if (dp && typeof dp.getFormattedDate === 'function') {
|
||||||
if (selectedData && selectedData.length > 0) {
|
val = dp.getFormattedDate(this.options.format || 'yyyy-mm-dd');
|
||||||
val = this.isMultiple ? selectedData.map(function(item) { return item.id; }) : selectedData[0].id;
|
}
|
||||||
}
|
|
||||||
}
|
// --- Handle Select2 v4.x ---
|
||||||
|
if (this.$input.data('select2')) {
|
||||||
return val;
|
var selectedData = this.$input.select2('data');
|
||||||
},
|
if (selectedData && selectedData.length > 0) {
|
||||||
|
val = this.isMultiple ? selectedData.map(function(item) { return item.id; }) : selectedData[0].id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return val;
|
||||||
|
},
|
||||||
|
|
||||||
str2value: function(str, separator) {
|
str2value: function(str, separator) {
|
||||||
if(typeof str !== 'string' || !this.isMultiple) {
|
if(typeof str !== 'string' || !this.isMultiple) {
|
||||||
|
|||||||
Reference in New Issue
Block a user