@@ -130,7 +130,7 @@ export default {
130130 :formatter =" formatter"
131131 :lang =" lang"
132132 :minute-step =" minuteStep"
133- :placeholder =" placeholder"
133+ :placeholder =" placeholder ? placeholder : defaultPlaceholder "
134134 :popup-class =" { 'show-week-number': showWeekNumber }"
135135 :show-week-number =" showWeekNumber"
136136 :type =" type"
@@ -168,7 +168,7 @@ export default {
168168<script >
169169import NcTimezonePicker from ' ../NcTimezonePicker/index.js'
170170import NcPopover from ' ../NcPopover/index.js'
171- import l10n from ' ../../mixins /l10n.js'
171+ import { t } from ' ../../l10n.js'
172172
173173import {
174174 getFirstDay ,
@@ -199,8 +199,6 @@ export default {
199199 NcTimezonePicker,
200200 },
201201
202- mixins: [l10n],
203-
204202 inheritAttrs: false ,
205203
206204 props: {
@@ -266,6 +264,11 @@ export default {
266264 type: Boolean ,
267265 default: false ,
268266 },
267+
268+ placeholder: {
269+ type: String ,
270+ default: null ,
271+ },
269272 },
270273
271274 emits: [
@@ -307,23 +310,23 @@ export default {
307310 *
308311 * @return {string}
309312 */
310- placeholder () {
313+ defaultPlaceholder () {
311314 if (this .type === ' time' ) {
312- return this . t (' Pick a time' )
315+ return t (' Pick a time' )
313316 }
314317 if (this .type === ' month' ) {
315- return this . t (' Pick a month' )
318+ return t (' Pick a month' )
316319 }
317320 if (this .type === ' year' ) {
318- return this . t (' Pick a year' )
321+ return t (' Pick a year' )
319322 }
320323 if (this .type === ' week' ) {
321- return this . t (' Pick a week' )
324+ return t (' Pick a week' )
322325 }
323326 if (this .type === ' date' ) {
324- return this . t (' Pick a date' )
327+ return t (' Pick a date' )
325328 }
326- return this . t (' Pick a date and a time' )
329+ return t (' Pick a date and a time' )
327330 },
328331
329332 /**
0 commit comments