From 6f605a75980cbb3f0e69739ee4b78ba612b4c525 Mon Sep 17 00:00:00 2001 From: Sergey Solodyagin Date: Thu, 11 Nov 2021 16:36:58 +0300 Subject: [PATCH] feat: change date format and month format on parent component props with default values --- README.md | 6 +++++- lib/components/GGanttChart.vue | 6 +++++- lib/components/GGanttRow.vue | 2 +- lib/components/GGanttTimeaxis.vue | 8 ++++---- package-lock.json | 4 ++-- package.json | 4 ++-- src/App.vue | 4 ++-- 7 files changed, 21 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 8ad5882..83c0bc1 100644 --- a/README.md +++ b/README.md @@ -123,20 +123,24 @@ The following code showcases a simple usage example in a .vue SFC (Single File C | Prop | Type | Default | Description | | ------------------------ | --------------- | ---------------- | ------------------------------------------------------------------- | +| allow-add | `Boolean` | `true` | allow to add new bar on double click | | bar-config-key | `String` | `ganttBarConfig` | | | bar-start-key | `String` | `start` | property name of the bar objects that represents the start datetime | | bar-end-key | `String` | `end` | property name of the bar objects that represents the end datetime | | chart-start (_required_) | `String` | - | format `YYYY-MM-DD HH:mm` | | chart-end (_required_) | `String` | - | format `YYYY-MM-DD HH:mm` | +| day-format | `String` | `ddd DD MMMM` | | | grid | `Boolean` | `false` | hide/show grid | | grid-size | `Number` | `30` | horizontal cell width in pixels | +| default-bar-length | `Number` | `1` | | | height | `String` | - | the total height of the entire Vue-Ganttastic component | | hide-timeaxis | `Boolean` | `false` | hide timeaxis | | highlighted-days | `Array` | `[]` | format of day `YYYY-MM-DD` | | highlighted-hours | `Array` | `[]` | | | is-magnetic | `Boolean` | - | magnetic effect | | locale | `String` | `en` | localization | -| may-add | `Boolean` | `true` | add new bar on double click | +| min-gap-between-bars | `Number` | `0` | | +| month-format | `String` | `MMMM YYYY` | | | precision | `String` | `month` | day, month | | push-on-overlap | `Boolean` | - | | | row-height | `Number` | `40` | | diff --git a/lib/components/GGanttChart.vue b/lib/components/GGanttChart.vue index 0e2b924..b730ba4 100644 --- a/lib/components/GGanttChart.vue +++ b/lib/components/GGanttChart.vue @@ -15,6 +15,8 @@ :time-format="timeFormat" :time-count="timeCount" :grid-size="gridSize" + :day-format="dayFormat" + :month-format="monthFormat" />