0

Currently vuejs datepicker for boostrap 3 looks like this:

enter image description here

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.

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.