mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-27 06:52:35 -04:00
[bug] fix saving datepicker value unchanged
This commit is contained in:
parent
2011064443
commit
5d7767dfea
@ -322,7 +322,7 @@
|
|||||||
names: listToDict(this.names),
|
names: listToDict(this.names),
|
||||||
pronouns: listToDict(this.pronouns),
|
pronouns: listToDict(this.pronouns),
|
||||||
description: this.description,
|
description: this.description,
|
||||||
birthday: this.birthday ? formatDate(this.birthday) : null,
|
birthday: formatDate(this.birthday),
|
||||||
links: [...this.links],
|
links: [...this.links],
|
||||||
flags: [...this.flags],
|
flags: [...this.flags],
|
||||||
customFlags: {...this.customFlags},
|
customFlags: {...this.customFlags},
|
||||||
|
@ -6,6 +6,8 @@ module.exports = {
|
|||||||
minBirthdate,
|
minBirthdate,
|
||||||
maxBirthdate,
|
maxBirthdate,
|
||||||
formatDate(bd) {
|
formatDate(bd) {
|
||||||
|
if (!bd) { return null; }
|
||||||
|
if (typeof(bd) === 'string') { return bd; }
|
||||||
return `${bd.getFullYear()}-${('0' + (bd.getMonth() + 1)).slice(-2)}-${('0' + bd.getDate()).slice(-2)}`;
|
return `${bd.getFullYear()}-${('0' + (bd.getMonth() + 1)).slice(-2)}-${('0' + bd.getDate()).slice(-2)}`;
|
||||||
},
|
},
|
||||||
parseDate(bd) {
|
parseDate(bd) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user