FIX: Make time attribute as optional for local-dates bbcode
This commit is contained in:
parent
a1c912b630
commit
f07bece17f
|
@ -101,7 +101,7 @@
|
|||
var options = {};
|
||||
options.format = $this.attr("data-format");
|
||||
options.date = $this.attr("data-date");
|
||||
options.time = $this.attr("data-time");
|
||||
options.time = $this.attr("data-time") || "00:00:00";
|
||||
options.recurring = $this.attr("data-recurring");
|
||||
options.timezones = $this.attr("data-timezones");
|
||||
options.forceTimezone = $this.attr("data-force-timezone");
|
||||
|
|
|
@ -20,6 +20,16 @@ test("local dates bbcode", async assert => {
|
|||
|
||||
assert.ok(
|
||||
exists(".d-editor-preview .discourse-local-date.past.cooked-date"),
|
||||
"it should contain the cooked date output"
|
||||
"it should contain the cooked output for date & time inputs"
|
||||
);
|
||||
|
||||
await fillIn(
|
||||
".d-editor-input",
|
||||
'[date=2017-10-23 format="LL" timezone="Asia/Calcutta" timezones="Europe/Paris|America/Los_Angeles"]'
|
||||
);
|
||||
|
||||
assert.ok(
|
||||
exists(".d-editor-preview .discourse-local-date.past.cooked-date"),
|
||||
"it should contain the cooked output for date only input"
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue