diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-01-04 16:06:53 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-01-04 16:06:53 +0100 |
commit | 4364500c6baaacda6fc366f2dfcc6acdc7a49b3c (patch) | |
tree | a190768b3eae6dbc1b2391925a95062fe8dedc2f /src/components/Properties | |
parent | 01aa0bfae50dbbf688943f9b30acc08a0d1fa1dd (diff) |
Make sure to properly set the month to the same start index than JS and moment
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/components/Properties')
-rw-r--r-- | src/components/Properties/PropertyDateTime.vue | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/components/Properties/PropertyDateTime.vue b/src/components/Properties/PropertyDateTime.vue index 5321e561..e8304281 100644 --- a/src/components/Properties/PropertyDateTime.vue +++ b/src/components/Properties/PropertyDateTime.vue @@ -221,11 +221,21 @@ export default { * Use the current year to ensure we do not lose * the year data on v4.0 since we currently have * no options to remove the year selection. + * ! using this.value since this.localValue reflect the current change + * ! so we need to make sure we do not use the updated data */ if (this.value.year === null) { rawData[0] = null } + /** + * VCardTime starts months at 1 + * but moment and js starts at 0 + * ! since we use moment to generate our time array + * ! we need to make sure the conversion to VCardTime is done well + */ + rawData[1]++ + // reset the VCardTime component to the selected date/time this.localValue.resetTo(...rawData) |