Skip to content

Commit

Permalink
Update the documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniandre committed Aug 27, 2022
1 parent 3ea50c9 commit aaae0e0
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
11 changes: 11 additions & 0 deletions src/documentation/api.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ div
resizeX: [Boolean], default: false
selectedDate: [String, Date], default: ''
showAllDayEvents: [Boolean, String], default: false
showTimeInCells: [Boolean], default: false
showWeekNumbers: [Boolean, String], default: false
small: [Boolean], default: false
snapToTime: [Number], default: null
Expand Down Expand Up @@ -365,6 +366,16 @@ div
p.
If #[span.code time] is enabled, set the start of the timeline in minutes.
By default it starts at midnight.
li
code.mr2 showTimeInCells
span.code [Boolean], default: false
p.
When set to #[span.code true], the time labels will be visible in
each cell, in each time slot of the #[code day] and #[code week] views.
You can then use CSS to style to taste.
For instance, you could hide all the labels and show only the one that
is being hovered.#[br]
Will have no effect if #[span.code time] is set to false.
li
code.mr2 timeTo
span.code [Number], default: 24 * 60
Expand Down
42 changes: 38 additions & 4 deletions src/documentation/examples.vue
Original file line number Diff line number Diff line change
Expand Up @@ -388,14 +388,48 @@
a(href="#ex--timeline") # Timeline
a#ex--timeline(name="ex--timeline")
p.
Timelines are only visible on #[span.code week] and #[span.code day] view.#[br]
This example has a set time range from 08:00 to 19:00, time step of 30 minutes (1 hour by default),
Timelines are only visible on #[span.code week] and #[span.code day] views.#[br]
This example has a set time range from #[code 08:00] to #[code 19:00], time step of #[code 30] minutes (1 hour by default),
24-hour format, and hidden weekends.
.example.my2.mxa(style="height: 450px")
vue-cal.vuecal--green-theme(:time-from="8 * 60" :time-to="19 * 60" :time-step="30" hide-weekends)
vue-cal.vuecal--green-theme(
:time-from="8 * 60"
:time-to="19 * 60"
:time-step="30"
hide-weekends)
ssh-pre(language="html-vue" label="Vue Template").
<!-- Time-start time-end & time-step are expected in minutes. -->
<vue-cal :time-from="8 * 60" :time-to="19 * 60" :time-step="30" hide-weekends />
<vue-cal
:time-from="8 * 60"
:time-to="19 * 60"
:time-step="30"
hide-weekends>
</vue-cal>
highlight-message For all the options details, refer to the #[a(href="#api") API] section.

//- Example.
h4.title2
a(href="#ex--show-time-in-cells") # Showing time labels in cells
a#ex--show-time-in-cells(name="ex--show-time-in-cells")
p.
You can choose to display the time labels in every cells by enabling the
#[span.code showTimeInCells] option.
.example.my2.mxa(style="height: 450px")
vue-cal.vuecal--green-theme(
:time-from="8 * 60"
:time-to="19 * 60"
:time-step="30"
show-time-in-cells
hide-weekends)
template(#no-event)  
ssh-pre(language="html-vue" label="Vue Template").
<vue-cal
:time-from="8 * 60"
:time-to="19 * 60"
:time-step="30"
hide-weekends
show-time-in-cells>
</vue-cal>
highlight-message For all the options details, refer to the #[a(href="#api") API] section.

//- Example.
Expand Down

0 comments on commit aaae0e0

Please sign in to comment.