Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enh(NcDatetimePicker): convert lang computed value to prop #3941

Merged
merged 1 commit into from
Mar 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/components/NcDatetimePicker/NcDatetimePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default {
:clearable="clearable"
:format="format ? format : formatTypeMap"
:formatter="formatter"
:lang="lang"
:lang="lang ? lang : defaultLang"
:minute-step="minuteStep"
:placeholder="placeholder ? placeholder : defaultPlaceholder"
:popup-class="{ 'show-week-number': showWeekNumber }"
Expand Down Expand Up @@ -237,6 +237,11 @@ export default {
default: null,
},

lang: {
type: Object,
default: null,
},

/**
* The value to initialize, but also two-way bind the selected date. The date is – like the `Date` object in
* JavaScript – tied to UTC. The selected time zone does not have an influence of the selected time and date
Expand Down Expand Up @@ -300,7 +305,7 @@ export default {
*
* @return {object}
*/
lang() {
defaultLang() {
return {
formatLocale: {
months: getMonthNames(),
Expand Down