mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-25 14:09:03 -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),
|
||||
pronouns: listToDict(this.pronouns),
|
||||
description: this.description,
|
||||
birthday: this.birthday ? formatDate(this.birthday) : null,
|
||||
birthday: formatDate(this.birthday),
|
||||
links: [...this.links],
|
||||
flags: [...this.flags],
|
||||
customFlags: {...this.customFlags},
|
||||
|
@ -6,6 +6,8 @@ module.exports = {
|
||||
minBirthdate,
|
||||
maxBirthdate,
|
||||
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)}`;
|
||||
},
|
||||
parseDate(bd) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user