Skip to content

Commit

Permalink
Fix DateTimePicker example and translation
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Nov 1, 2022
1 parent 0f329e8 commit 7c2cb3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 26 deletions.
18 changes: 0 additions & 18 deletions l10n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -122,24 +122,6 @@ msgstr ""
msgid "People & Body"
msgstr ""

msgid "Pick a date"
msgstr ""

msgid "Pick a date and a time"
msgstr ""

msgid "Pick a month"
msgstr ""

msgid "Pick a time"
msgstr ""

msgid "Pick a week"
msgstr ""

msgid "Pick a year"
msgstr ""

msgid "Pick an emoji"
msgstr ""

Expand Down
17 changes: 9 additions & 8 deletions src/components/NcDatetimePicker/NcDatetimePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
export default {
data() {
return {
time: null,
time: new Date('2022-10-10 10:10:10'),
}
},
}
Expand Down Expand Up @@ -168,7 +168,7 @@ export default {
<script>
import NcTimezonePicker from '../NcTimezonePicker/index.js'
import NcPopover from '../NcPopover/index.js'
import { t } from '../../l10n.js'
import l10n from '../../mixins/l10n.js'
import {
getFirstDay,
Expand Down Expand Up @@ -199,6 +199,7 @@ export default {
NcTimezonePicker,
},
mixins: [l10n],
inheritAttrs: false,
props: {
Expand Down Expand Up @@ -312,21 +313,21 @@ export default {
*/
defaultPlaceholder() {
if (this.type === 'time') {
return t('Pick a time')
return this.t('Pick a time')
}
if (this.type === 'month') {
return t('Pick a month')
return this.t('Pick a month')
}
if (this.type === 'year') {
return t('Pick a year')
return this.t('Pick a year')
}
if (this.type === 'week') {
return t('Pick a week')
return this.t('Pick a week')
}
if (this.type === 'date') {
return t('Pick a date')
return this.t('Pick a date')
}
return t('Pick a date and a time')
return this.t('Pick a date and a time')
},
/**
Expand Down

0 comments on commit 7c2cb3d

Please sign in to comment.