FIX: do not automatically infere date type (#6127)
This commit is contained in:
parent
9d919406c4
commit
3fdc4f2df1
|
@ -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")
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue