Reputation: 5133
Currently vuejs datepicker for boostrap 3 looks like this:
As you can see, we have a label 2018 April
. What I need is to change that label into April 2018
.
I saw that the component doesn't have any API reference that can help me with that. Any ideas?
My solution would be to find a way to modify the plugin but that is the last solution.
Upvotes: 0
Views: 588
Reputation: 16334
indeed, you can't. From the source code of your plugin: https://github.com/wxsms/uiv/blob/master/src/components/datepicker/DateView.vue
2018 April
is coded as <b>{{yearMonthStr}}</b>
. This is a computed property defined as follow:
yearMonthStr () {
return isExist(this.month) ? `${this.year} ${this.t(`uiv.datePicker.month${this.month + 1}`)}` : this.year
},
So as you say, it's complicated and you might have to modify the plugin. You could make a pull request to the project adding an option to the component to customize the month.
Upvotes: 2