mediacube-ui 0.1.196 → 0.1.197

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.197](https://github.com/MediaCubeCo/mcui/compare/v0.1.196...v0.1.197) (2023-12-20)
6
+
5
7
  ### [0.1.196](https://github.com/MediaCubeCo/mcui/compare/v0.1.195...v0.1.196) (2023-12-20)
6
8
 
7
9
  ### [0.1.195](https://github.com/MediaCubeCo/mcui/compare/v0.1.194...v0.1.195) (2023-12-19)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediacube-ui",
3
- "version": "0.1.196",
3
+ "version": "0.1.197",
4
4
  "description": "Design system for Mediacube services",
5
5
  "author": "Mediacube",
6
6
  "private": false,
@@ -413,8 +413,14 @@ export default {
413
413
  return formattingDate(this.value)
414
414
  },
415
415
  },
416
- async mounted() {
417
- await this.setupDayjsLocale()
416
+ watch: {
417
+ lang: {
418
+ immediate: true,
419
+ handler() {
420
+ this.setupDayjsLocale()
421
+ this.setupDatePickerLocale()
422
+ }
423
+ }
418
424
  },
419
425
  methods: {
420
426
  async setupDayjsLocale() {
@@ -422,6 +428,10 @@ export default {
422
428
  await dayjsLocales[locale]?.()
423
429
  dayjs.locale(locale)
424
430
  },
431
+ setupDatePickerLocale() {
432
+ const locale = ['en', 'ru', 'es'].includes(this.lang) ? this.lang : 'en'
433
+ DatePicker.locale(locale);
434
+ },
425
435
  handleEmitDate(value) {
426
436
  const date = this.getFormattedDate(value)
427
437
  this.toggleErrorVisible()