Skip to content

Commit 4aa7dad

Browse files
author
Nathan Reyes
committed
Update CHANGELOG and README for next rev. Roll revision
1 parent 19b8d6f commit 4aa7dad

File tree

3 files changed

+51
-3
lines changed

3 files changed

+51
-3
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# v0.9.2
2+
## Bug Fixes
3+
### `v-calendar`
4+
* Fixes bug where detected locale getting overwritten by 'en-US' in some cases. Closes #101.
5+
6+
## Improvements
7+
### `v-calendar`
8+
* Adds support for importing individual components along with a method to `setupCalendar`. Closes #60. Closes #105.
9+
* Includes full `page` object with `update:frompage` and `update:topage` events. Closes #120.
10+
111
# v0.9.1
212
## Bug Fixes
313
### `v-calendar`

README.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ The first thing to understand about attributes is what they are capable of displ
3838
* Bar Indicators
3939
* Popovers
4040
* Content Styles
41-
* Content Hover Styles (applied on hover state)
4241

4342
For now, let's just start by displaying a simple highlight on today's date.
4443

@@ -371,6 +370,16 @@ Use the following tokens to configure your custom formats:
371370

372371
---
373372

373+
## I19n
374+
375+
VCalendar utilizes the [well supported](https://caniuse.com/#feat=internationalization) Internationalization API to derive month and weekday names and formatting. This helps keep the package size down, as well as supporting multiple locales in the most performant and isomorphic way.
376+
377+
At the moment, this API still cannot provide all recommended default settings per locale (such as 'first day of the week'), so those settings are provided out of the box for a reasonable number of locales, with a decent fallback for those locales that aren't included.
378+
379+
With all of this in mind, it is probably best that you rely on the the plugin's built-in methods for detecting the user's locale. However, if you would like to force a specific locale for all users, you may supply your own [default locale](#custom-defaults) using the [*language-region*](https://lingohub.com/documentation/developers/supported-locales/language-designators-with-regions/) format.
380+
381+
---
382+
374383
# Installation
375384

376385
[Vue.js](https://vuejs.org) version 2.5+ is required.
@@ -382,13 +391,41 @@ npm install v-calendar
382391
```
383392

384393
### 2 Import and use VCalendar
394+
395+
#### 2A. Plugin Method (**Recommended**)
396+
397+
This is the most common use case.
398+
385399
```javascript
386400
import Vue from 'vue';
387401
import VCalendar from 'v-calendar';
388402
import 'v-calendar/lib/v-calendar.min.css';
389403

390404
// Use v-calendar, v-date-picker & v-popover components
391-
Vue.use(VCalendar);
405+
Vue.use(VCalendar, {
406+
firstDayOfWeek: 2, // Monday
407+
..., // ...other defaults
408+
});
409+
410+
```
411+
412+
#### 2B. Components Method
413+
414+
Or, you can just import and use the calendar if you don't need the `v-date-picker` or `v-popover` components. Keep in mind that `setupCalendar` still needs to be called (passing optional defaults) using this method.
415+
416+
```javascript
417+
import Vue from 'vue';
418+
import { setupCalendar, Calendar} from 'v-calendar'
419+
import 'v-calendar/lib/v-calendar.min.css';
420+
421+
// Remember to setup calendar (passing in defaults if needed)
422+
setupCalendar({
423+
firstDayOfWeek: 2, // Monday,
424+
..., // ...other defaults
425+
});
426+
427+
// Register component(s)
428+
Vue.component('v-calendar', Calendar);
392429
```
393430

394431
### 3 Reference in your component templates
@@ -474,6 +511,7 @@ Vue.use(VCalendar, {
474511

475512
| Property Name | Type | Description | Default |
476513
| ------------- | ---- | ----------- | ------- |
514+
| `locale` | String | Locale identification in [*language-region*](https://lingohub.com/documentation/developers/supported-locales/language-designators-with-regions/) format. Not all regions supported. | `undefined` |
477515
| `componentPrefix` | String | Custom prefix to use for plugin components. Replace if `v-calendar` and `v-date-picker` interfere with other component libraries. | `"v"` |
478516
| `firstDayOfWeek` | Number | Day number for the first day of the week (1: Sun - 7: Sat) | `1` |
479517
| `formats` | Object | Formats to use when display and parsing dates for various calendar sections | Reference code |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "v-calendar",
3-
"version": "0.9.1",
3+
"version": "0.9.2",
44
"description": "A clean and extendable plugin for building simple attributed calendars in Vue.js.",
55
"keywords": [
66
"vue",

0 commit comments

Comments
 (0)