ZestfulNation / vue-hotel-datepicker

A VueJS v2 responsive date range picker. Displays the number of nights selected and allow several useful options like custom check-in/check-out rules, localization support and more.
https://zestfulnation.github.io/vue-hotel-datepicker/
MIT License
840 stars 220 forks source link

feat!: change showYear to monthFormat #249

Closed aaharu closed 3 years ago

aaharu commented 3 years ago

Thank you for useful library.

In Japan, the month displayed as "January 2020" is displayed as "2020年1月". So showYear is not suitable in some languages.

What do you think of this change?

matiasperrone commented 3 years ago

I think that we should add "monthFormat", but do not remove "showYear" to mantain backwards compatibility. Although it could be marked as "deprecated", but I don't think so.

superbiche commented 3 years ago

I think that we should add "monthFormat", but do not remove "showYear" to mantain backwards compatibility. Although it could be marked as "deprecated", but I don't think so.

@matiasperrone as it's targeted to v4.0, we can break BC and remove showYear, as the approach @aaharu suggests is more flexible and tackles both the showYear toggle and the custom format. Moreover, we're already breaking BC in v4.0 so, maybe it's OK to break it a bit more :)

aaharu commented 3 years ago

Thanks for reviewing. I added explanations to migrate showYear

superbiche commented 3 years ago

@aaharu hey, any reason it's still a Draft? It's good to merge if you ask me, just need you to remove the Draft status if you also consider it ready. @matiasperrone feel free to let me know what you think if you had time to review it

matiasperrone commented 3 years ago

I'm going to check this out and do the merge... I need a couple of days

matiasperrone commented 3 years ago

Now a lot of time passed since last time I checked this issue. I think that I can find a compromise solution a possible mixed solution with back compatibility.

matiasperrone commented 3 years ago

I'll be adding a yearBeforeMonth variable in v4.1 in order to achieve this behavior