Skip to content

Commit 58d9aba

Browse files
Rearrange some tips
1 parent 41b8f82 commit 58d9aba

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ In your application, you will need to:
9999

100100
Tips:
101101

102+
- Remember to use _kebab-case_ when specifying these properties using attributes on the `calendar-view` element (_e.g._, `<calendar-view month-name-format="long">`)
103+
- Remember to use _data binding_ (`:` prefix) for properties that should be a `Boolean`, `Number`, `Array`, or otherwise interpreted with JavaScript (_e.g._, `<calendar-view :show-times="true">`). You can omit the `:` for `String` properties with literal values.
102104
- The component will fill its parent's height and width, so be sure the parent has a minimum height that is appropriate for the number of weeks and average items per week being shown.
103105
- The default calendar header emits an `input` event when a user clicks a button in the header to move the calendar backward or forward through time. The event's argument is the new date to be shown. You have to handle this event and pass the date back to the calendar to change the view.
104106
- To minimize the impact of an ancestor element's layout on the calendar's functionality, it is **recommended** that the parent of the `<calendar-view>` component _only_ contain the component, and that the parent have the following styles (#71):
@@ -128,7 +130,7 @@ Here's a minimal application example for an empty calendar, styled with the defa
128130
</template>
129131
<script>
130132
import { CalendarView, CalendarViewHeader } from "vue-simple-calendar"
131-
133+
132134
import "..relative-path-to-node_modules/vue-simple-calendar/dist/style.css"
133135
// The next two lines are optional themes
134136
import "..relative-path-to-node_modules/vue-simple-calendar/static/css/default.css"
@@ -206,11 +208,6 @@ Note: Each date between `selectionStart` and `selectionEnd` (including them) has
206208
- `itemContentHeight` - Optional CSS string of the total height of your items, _not including_ borders. The default is `1.4em` (1.0 from the font, 0.2 \* 2 from the padding.). You would only set this if you're overriding the item height. This doesn't actually change the item height, it is only used to position the items below one another.
207209
- `itemBorderHeight` - Optional CSS string of the sum of your items' top and bottom borders. The default is `2px`. You would only set this if you're overriding the item's top and/or bottom border width. This doesn't change the borders, it is only used to position the items below one another.
208210

209-
Tips for Vue component properties:
210-
211-
- Remember to use _kebab-case_ when specifying these properties using attributes on the `calendar-view` element (_e.g._, `<calendar-view month-name-format="long">`:
212-
- Remember to use _binding_ (`:` prefix) for properties that should be a Boolean, number, array, or otherwise interpreted with JavaScript (_e.g._, `<calendar-view :show-times="true">`). You can omit the `:` for string properties with literal values.
213-
214211
## Calendar Item Properties
215212

216213
Each item shown on the calendar can have the following properties. `id` and `startDate` are required, and `title` is strongly recommended.

0 commit comments

Comments
 (0)