forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomLocale.vue
More file actions
35 lines (31 loc) · 998 Bytes
/
CustomLocale.vue
File metadata and controls
35 lines (31 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<template>
<div class="q-pa-md">
<div class="q-pb-sm">
<q-badge color="teal">
Model: {{ model }}
</q-badge>
</div>
<q-time v-model="model" mask="MMMM D, YYYY - HH:mm" :locale="myLocale" />
</div>
</template>
<script>
import { ref } from 'vue'
export default {
setup () {
return {
model: ref('Febrero 22, 2019 - 21:02'),
// can supply only what needed (the rest will be taken from current locale):
myLocale: {
/* starting with Sunday */
days: 'Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado'.split('_'),
daysShort: 'Dom_Lun_Mar_Mié_Jue_Vie_Sáb'.split('_'),
months: 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'),
monthsShort: 'Ene_Feb_Mar_Abr_May_Jun_Jul_Ago_Sep_Oct_Nov_Dic'.split('_'),
firstDayOfWeek: 1, // 0-6, 0 - Sunday, 1 Monday, ...
format24h: true,
pluralDay: 'dias'
}
}
}
}
</script>