mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:10:17 +08:00
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
Block a user