From e4c194ccded61fa123504e3edd95a48160eec452 Mon Sep 17 00:00:00 2001 From: Atul Pratap Singh Date: Tue, 5 Jan 2016 16:32:22 +0530 Subject: [PATCH] Fix #11821 TypeError: $this_function.val(...) is null Signed-off-by: Atul Pratap Singh --- js/functions.js | 3 +++ js/tbl_change.js | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/js/functions.js b/js/functions.js index 30ac8ddb6f..e3b192d049 100644 --- a/js/functions.js +++ b/js/functions.js @@ -465,6 +465,9 @@ function PMA_addDatepicker($this_element, type, options) onClose: function (dateText, dp_inst) { // The value is no more from the date picker $this_element.data('comes_from', ''); + if (typeof $this_element.data('datepicker') !== 'undefined') { + $this_element.data('datepicker').inline = false; + } } }; if (type == "datetime" || type == "timestamp") { diff --git a/js/tbl_change.js b/js/tbl_change.js index 29a186b3da..1ea18926c5 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -168,7 +168,10 @@ function verificationsAfterFieldChange(urlField, multi_edit, theType) var $this_function = $("select[name='funcs[multi_edit][" + multi_edit + "][" + urlField + "]']"); var function_selected = false; - if (typeof $this_function.val() !== 'undefined' && $this_function.val().length > 0) { + if (typeof $this_function.val() !== 'undefined' + && $this_function.val() !== null + && $this_function.val().length > 0 + ) { function_selected = true; }