diff --git a/packages/docs/src/locales/en/en.json b/packages/docs/src/locales/en/en.json index 8b13a0dff7..6175fea20c 100644 --- a/packages/docs/src/locales/en/en.json +++ b/packages/docs/src/locales/en/en.json @@ -1148,12 +1148,15 @@ }, "VaTimePicker": { "props": { - "ampm": "Use 12-hours time format.", + "ampm": "Use 12-hours time format", "hoursFilter": "Function that allows you to hide some specific hours", "minutesFilter": "Function that allows you to hide some specific minutes", "secondsFilter": "Function that allows you to hide some specific seconds", "view": "View specifying which columns will be shown", - "periodUpdatesModelValue": "If user will change period it will automatically update model value. You can turn off it and am/pm switch will only change view." + "periodUpdatesModelValue": "If user will change period it will automatically update model value. You can turn off it and am/pm switch will only change view.", + "framed": "Adds borders to center of the picker", + "cellHeight": "Height of the time cell", + "visibleCellsCount": "Count of time cells to display" }, "events": {}, "methods": {}, @@ -3957,6 +3960,14 @@ "title": "Default", "text": "" }, + "framed": { + "title": "Framed", + "text": "" + }, + "visibleCellsCount": { + "title": "Controlling the count of displayed cells", + "text": "For the better view need to set odd numbers" + }, "readonlyAndDisabled": { "title": "Readonly and disabled", "text": "" diff --git a/packages/docs/src/locales/ru/ru.json b/packages/docs/src/locales/ru/ru.json index 4a277344b5..e1862ff9c2 100644 --- a/packages/docs/src/locales/ru/ru.json +++ b/packages/docs/src/locales/ru/ru.json @@ -1134,7 +1134,17 @@ } }, "VaTimePicker": { - "props": {}, + "props": { + "ampm": "12 часовой формат", + "hoursFilter": "Функция, позволяющая скрыть определенные часы", + "minutesFilter": "Функция, позволяющая скрыть определенные минуты", + "secondsFilter": "Функция, позволяющая скрыть определенные секунды", + "view": "Отображение только выбранных колонок", + "periodUpdatesModelValue": "Изменение периода времен автоматически обновит model value при переключении AM/PM", + "framed": "Добавляет рамки по центру компонента для выделения выбранных значений", + "cellHeight": "Высота ячейки времени", + "visibleCellsCount": "Количество ячеек времени для отображения" + }, "events": {}, "methods": {}, "slots": {} @@ -3831,6 +3841,14 @@ "title": "Базовое использование", "text": "" }, + "framed": { + "title": "Рамки", + "text": "" + }, + "visibleCellsCount": { + "title": "Контроль количества отображаемых ячеек", + "text": "Для лучшего вида, нужно задавать нечетные числа" + }, "readonlyAndDisabled": { "title": "Только для чтения и отключение", "text": "" diff --git a/packages/docs/src/page-configs/ui-elements/time-picker/examples/framed.vue b/packages/docs/src/page-configs/ui-elements/time-picker/examples/framed.vue new file mode 100644 index 0000000000..c60aca7143 --- /dev/null +++ b/packages/docs/src/page-configs/ui-elements/time-picker/examples/framed.vue @@ -0,0 +1,15 @@ + + + diff --git a/packages/docs/src/page-configs/ui-elements/time-picker/examples/visibleCellsCount.vue b/packages/docs/src/page-configs/ui-elements/time-picker/examples/visibleCellsCount.vue new file mode 100644 index 0000000000..1284fc257f --- /dev/null +++ b/packages/docs/src/page-configs/ui-elements/time-picker/examples/visibleCellsCount.vue @@ -0,0 +1,21 @@ + + + diff --git a/packages/docs/src/page-configs/ui-elements/time-picker/page-config.ts b/packages/docs/src/page-configs/ui-elements/time-picker/page-config.ts index 808244b6ec..6fc94ebd37 100644 --- a/packages/docs/src/page-configs/ui-elements/time-picker/page-config.ts +++ b/packages/docs/src/page-configs/ui-elements/time-picker/page-config.ts @@ -20,6 +20,18 @@ const config: ApiDocsBlock[] = [ 'default', ), + ...block.exampleBlock( + 'timePicker.examples.framed.title', + 'timePicker.examples.framed.text', + 'framed', + ), + + ...block.exampleBlock( + 'timePicker.examples.visibleCellsCount.title', + 'timePicker.examples.visibleCellsCount.text', + 'visibleCellsCount', + ), + ...block.exampleBlock( 'timePicker.examples.readonlyAndDisabled.title', 'timePicker.examples.readonlyAndDisabled.text', diff --git a/packages/ui/src/components/va-time-picker/VaTimePicker.demo.vue b/packages/ui/src/components/va-time-picker/VaTimePicker.demo.vue index 01cb61305c..c103b5b6ac 100644 --- a/packages/ui/src/components/va-time-picker/VaTimePicker.demo.vue +++ b/packages/ui/src/components/va-time-picker/VaTimePicker.demo.vue @@ -13,29 +13,51 @@ - -
- +
+ + + +
- +
+ +

- +
+ + + +
- 23:05:53 -
- {{ value.getHours() }}:{{ value.getMinutes() }}:{{ value.getSeconds() }} -
- +
+ 23:05:53 + {{ selectedTime }} +

- +
+ + + +
- + @@ -45,15 +67,39 @@ + + + + + + +
+ Show 2 + Show 5 + Show 12 +
+
+
+ + + + + +
+
diff --git a/packages/ui/src/components/va-time-picker/VaTimePicker.vue b/packages/ui/src/components/va-time-picker/VaTimePicker.vue index 8974286d6c..ffb70032cc 100644 --- a/packages/ui/src/components/va-time-picker/VaTimePicker.vue +++ b/packages/ui/src/components/va-time-picker/VaTimePicker.vue @@ -1,10 +1,15 @@