mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: do not automatically infere date type (#6127)
This commit is contained in:
@@ -61,11 +61,10 @@ const Report = Discourse.Model.extend({
|
||||
formatedValue: number(value)
|
||||
});
|
||||
|
||||
if (type !== "string" && type !== "text") {
|
||||
if (type === "date") {
|
||||
const date = moment(value, "YYYY-MM-DD");
|
||||
if (type === "date" || date.isValid()) {
|
||||
if (date.isValid()) {
|
||||
return _.assign(base, {
|
||||
type: "date",
|
||||
formatedValue: date.format("LL")
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user