From 73c6f6b3deb95fff270898dfb3e48c116f714d5c Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Wed, 14 Feb 2018 14:45:58 +0100 Subject: Bug 1320225: [DateTimeInput] Integration of input type=date input box with picker (part 2) --- toolkit/content/browser-content.js | 1 + 1 file changed, 1 insertion(+) (limited to 'toolkit/content/browser-content.js') diff --git a/toolkit/content/browser-content.js b/toolkit/content/browser-content.js index 4ae798fbd..731b55185 100644 --- a/toolkit/content/browser-content.js +++ b/toolkit/content/browser-content.js @@ -1737,6 +1737,7 @@ let DateTimePickerListener = { } case "MozUpdateDateTimePicker": { let value = this._inputElement.getDateTimeInputBoxValue(); + value.type = this._inputElement.type; sendAsyncMessage("FormDateTime:UpdatePicker", { value }); break; } -- cgit v1.2.3 From 6f1fcab2d81caedd96d9404386bc92f9884c30ce Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Fri, 30 Mar 2018 20:56:33 +0200 Subject: Bug 1363672 - Add step support to date picker --- toolkit/content/browser-content.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'toolkit/content/browser-content.js') diff --git a/toolkit/content/browser-content.js b/toolkit/content/browser-content.js index 731b55185..b955bd29d 100644 --- a/toolkit/content/browser-content.js +++ b/toolkit/content/browser-content.js @@ -1728,9 +1728,10 @@ let DateTimePickerListener = { // element's value. value: Object.keys(value).length > 0 ? value : this._inputElement.value, - step: this._inputElement.step, min: this._inputElement.min, max: this._inputElement.max, + step: this._inputElement.getStep(), + stepBase: this._inputElement.getStepBase(), }, }); break; -- cgit v1.2.3 From 6a44ab26592fbe95b69e1bf4d3a3b0de03a99b26 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Fri, 30 Mar 2018 21:14:18 +0200 Subject: Bug 1364026 - (Part 2) Check if min and max attributes on input type date are valid date strings --- toolkit/content/browser-content.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toolkit/content/browser-content.js') diff --git a/toolkit/content/browser-content.js b/toolkit/content/browser-content.js index b955bd29d..145de9608 100644 --- a/toolkit/content/browser-content.js +++ b/toolkit/content/browser-content.js @@ -1728,8 +1728,8 @@ let DateTimePickerListener = { // element's value. value: Object.keys(value).length > 0 ? value : this._inputElement.value, - min: this._inputElement.min, - max: this._inputElement.max, + min: this._inputElement.getMinimum(), + max: this._inputElement.getMaximum(), step: this._inputElement.getStep(), stepBase: this._inputElement.getStepBase(), }, -- cgit v1.2.3 From 09cc05a97f387d2342ad49c64d66da0b0b9ae7e7 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sat, 31 Mar 2018 07:07:45 +0200 Subject: Bug 1406859 - [DateTimePicker] Let the first picker close gracefully before opening a second picker --- toolkit/content/browser-content.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'toolkit/content/browser-content.js') diff --git a/toolkit/content/browser-content.js b/toolkit/content/browser-content.js index 145de9608..1376f70a3 100644 --- a/toolkit/content/browser-content.js +++ b/toolkit/content/browser-content.js @@ -1714,6 +1714,14 @@ let DateTimePickerListener = { (aEvent.originalTarget.type == "time" && !this.getTimePickerPref())) { return; } + + if (this._inputElement) { + // This happens when we're trying to open a picker when another picker + // is still open. We ignore this request to let the first picker + // close gracefully. + return; + } + this._inputElement = aEvent.originalTarget; this._inputElement.setDateTimePickerState(true); this.addListeners(); -- cgit v1.2.3