From acd27cd38031223f899a3955953ab159e4ea141f Mon Sep 17 00:00:00 2001 From: Faizaan Gagan Date: Mon, 22 Nov 2021 00:30:29 +0530 Subject: [PATCH] FIX: don't pass format to date picker --- .../components/wizard-date-input.js.es6 | 30 ------------------- plugin.rb | 2 +- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/assets/javascripts/wizard/components/wizard-date-input.js.es6 b/assets/javascripts/wizard/components/wizard-date-input.js.es6 index bb11b655..0acdc24c 100644 --- a/assets/javascripts/wizard/components/wizard-date-input.js.es6 +++ b/assets/javascripts/wizard/components/wizard-date-input.js.es6 @@ -1,8 +1,6 @@ import DateInput from "discourse/components/date-input"; -import loadScript from "discourse/lib/load-script"; import discourseComputed from "discourse-common/utils/decorators"; import I18n from "I18n"; -/* global Pikaday:true */ export default DateInput.extend({ useNativePicker: false, @@ -11,32 +9,4 @@ export default DateInput.extend({ placeholder() { return this.format; }, - - _loadPikadayPicker(container) { - return loadScript("/javascripts/pikaday.js").then(() => { - let defaultOptions = { - field: this.element.querySelector(".date-picker"), - container: container || this.element.querySelector(".picker-container"), - bound: container === null, - format: this.format, - firstDay: 1, - i18n: { - previousMonth: I18n.t("dates.previous_month"), - nextMonth: I18n.t("dates.next_month"), - months: moment.months(), - weekdays: moment.weekdays(), - weekdaysShort: moment.weekdaysShort(), - }, - onSelect: (date) => this._handleSelection(date), - }; - - if (this.relativeDate) { - defaultOptions = Object.assign({}, defaultOptions, { - minDate: moment(this.relativeDate).toDate(), - }); - } - - return new Pikaday(Object.assign({}, defaultOptions, this._opts())); - }); - }, }); diff --git a/plugin.rb b/plugin.rb index b4d09421..752b6b92 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Create custom wizards -# version: 1.15.3 +# version: 1.15.4 # authors: Angus McLeod # url: https://github.com/paviliondev/discourse-custom-wizard # contact emails: angus@thepavilion.io