mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-25 22:19:28 -04:00
Merge branch 'main' into 'main'
Bugfix and QOL enhancements to birthdate editor See merge request Avris/Zaimki!294
This commit is contained in:
commit
bf68fbafe1
@ -212,7 +212,7 @@
|
||||
<T>profile.birthdayInfo</T>
|
||||
</p>
|
||||
<div class="input-group mb-3">
|
||||
<datepicker v-model="birthday" inline :disabled-dates="disabledDates" initial-view="year"/>
|
||||
<datepicker v-model="birthday" inline :disabled-dates="disabledDates" :open-date="disabledDates.from" :initial-view="birthday !== null ? 'day' : 'year'"/>
|
||||
</div>
|
||||
<PropagateCheckbox field="birthday" :before="beforeChanges.birthday" :after="birthday" v-if="otherProfiles > 0" @change="propagateChanged"/>
|
||||
</section>
|
||||
@ -281,7 +281,7 @@
|
||||
import { buildPronoun } from "../src/buildPronoun";
|
||||
import config from '../data/config.suml';
|
||||
import link from '../plugins/link';
|
||||
import {minBirthdate, maxBirthdate, formatDate} from '../src/birthdate';
|
||||
import {minBirthdate, maxBirthdate, formatDate, parseDate} from '../src/birthdate';
|
||||
import opinions from '../src/opinions';
|
||||
import t from '../src/translator';``
|
||||
|
||||
@ -329,7 +329,7 @@
|
||||
names: profile.names,
|
||||
pronouns: profile.pronouns,
|
||||
description: profile.description,
|
||||
birthday: profile.birthday,
|
||||
birthday: parseDate(profile.birthday),
|
||||
timezone: profile.timezone,
|
||||
links: profile.links,
|
||||
flags: profile.flags,
|
||||
@ -356,7 +356,7 @@
|
||||
names: profile.names,
|
||||
pronouns: [],
|
||||
description: '',
|
||||
birthday: profile.birthday,
|
||||
birthday: parseDate(profile.birthday),
|
||||
timezone: profile.timezone,
|
||||
links: profile.links,
|
||||
flags: profile.flags.filter(f => !f.startsWith('-')),
|
||||
|
@ -11,6 +11,7 @@ module.exports = {
|
||||
return `${bd.getFullYear()}-${('0' + (bd.getMonth() + 1)).slice(-2)}-${('0' + bd.getDate()).slice(-2)}`;
|
||||
},
|
||||
parseDate(bd) {
|
||||
if (typeof(bd) !== 'string') { return bd; }
|
||||
return new Date(
|
||||
parseInt(bd.substring(0, 4)),
|
||||
parseInt(bd.substring(5, 7)) - 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user