Skip to content

Commit

Permalink
v3.9.0
Browse files Browse the repository at this point in the history
Added support for week numbers in dayGrid view
Fixed dates in the return value of the addEvent() method
  • Loading branch information
robvankeilegom authored and vkurko committed Jan 27, 2025
1 parent 2d580c3 commit b5de30d
Show file tree
Hide file tree
Showing 27 changed files with 583 additions and 155 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Event Calendar changelog

## 3.9.0
January 27, 2025

* Added support for week numbers in `dayGrid` view ([389](https://github.com/vkurko/calendar/issues/389))
* Fixed dates in the return value of the `addEvent()` method ([419](https://github.com/vkurko/calendar/issues/419))

## 3.8.0
January 6, 2025

Expand Down
51 changes: 46 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
- [eventDragMinDistance](#eventdragmindistance)
- [eventDragStart](#eventdragstart)
- [eventDragStop](#eventdragstop)
- [eventDrop](#eventdrop)
</td><td>

- [eventDrop](#eventdrop)
- [eventDurationEditable](#eventdurationeditable)
- [eventLongPressDelay](#eventlongpressdelay)
- [eventMouseEnter](#eventmouseenter)
Expand Down Expand Up @@ -77,10 +77,10 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
- [locale](#locale)
- [longPressDelay](#longpressdelay)
- [moreLinkContent](#morelinkcontent)
</td><td>

- [noEventsClick](#noeventsclick)
- [noEventsContent](#noeventscontent)
</td><td>

- [nowIndicator](#nowindicator)
- [pointer](#pointer)
- [resources](#resources)
Expand All @@ -107,6 +107,8 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
- [view](#view)
- [viewDidMount](#viewdidmount)
- [views](#views)
- [weekNumberContent](#weeknumbercontent)
- [weekNumbers](#weeknumbers)
</td></tr>
</table>
- [Methods](#methods)
Expand Down Expand Up @@ -204,8 +206,8 @@ Or in your Svelte component, use the calendar like this:
### Pre-built browser ready bundle
Include the following lines of code in the `<head>` section of your page:
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.8.0/event-calendar.min.css">
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.8.0/event-calendar.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.9.0/event-calendar.min.css">
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.9.0/event-calendar.min.js"></script>
```

<details>
Expand Down Expand Up @@ -2263,6 +2265,45 @@ The mounted [View](#view-object) object

You can specify options that apply only to specific views. To do so provide separate options objects within the `views` option, keyed by the name of the view.

### weekNumberContent
- Type `Content` or `function`
- Default `undefined`

Defines the text that is displayed in place of the default week number (such as `W01`).

This value can be either a [Content](#content) or a function that returns content:

```js
function (arg) {
// return Content
}
```
`arg` is an object with the following properties:
<table>
<tr>
<td>

`date`
</td>
<td>JavaScript Date object containing the day within which the week number will be displayed</td>
</tr>
<tr>
<td>

`week`
</td>
<td>Calculated week number</td>
</tr>
</table>

### weekNumbers
- Type `boolean`
- Default `false`

Determines whether week numbers should be displayed in the `dayGrid` view.

The numbering of weeks depends on the value of [firstDay](#firstday). When `firstDay` is `0`, the [Western](https://en.wikipedia.org/wiki/Week#Other_week_numbering_systems) system is used. Any other value uses the [ISO](https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system) system.

## Methods
Methods allow you to manipulate the Event Calendar after initialization. They are accessible from the calendar instance.

Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<link rel="manifest" href="site.webmanifest">
<link rel="stylesheet" href="global.css?20231021">

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.8.0/event-calendar.min.css">
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.8.0/event-calendar.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.9.0/event-calendar.min.css">
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.9.0/event-calendar.min.js"></script>
<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
Expand Down
62 changes: 31 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "event-calendar",
"version": "3.8.0",
"version": "3.9.0",
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w",
Expand All @@ -13,14 +13,14 @@
"@babel/plugin-transform-runtime": "^7.25.9",
"@babel/preset-env": "^7.26.0",
"@babel/runtime-corejs3": "^7.26.0",
"@event-calendar/build": "~3.8.0",
"@event-calendar/core": "~3.8.0",
"@event-calendar/day-grid": "~3.8.0",
"@event-calendar/interaction": "~3.8.0",
"@event-calendar/list": "~3.8.0",
"@event-calendar/resource-time-grid": "~3.8.0",
"@event-calendar/resource-timeline": "~3.8.0",
"@event-calendar/time-grid": "~3.8.0",
"@event-calendar/build": "~3.9.0",
"@event-calendar/core": "~3.9.0",
"@event-calendar/day-grid": "~3.9.0",
"@event-calendar/interaction": "~3.9.0",
"@event-calendar/list": "~3.9.0",
"@event-calendar/resource-time-grid": "~3.9.0",
"@event-calendar/resource-timeline": "~3.9.0",
"@event-calendar/time-grid": "~3.9.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^28.0.1",
"@rollup/plugin-node-resolve": "^15.3.0",
Expand Down
51 changes: 46 additions & 5 deletions packages/build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
- [eventDragMinDistance](#eventdragmindistance)
- [eventDragStart](#eventdragstart)
- [eventDragStop](#eventdragstop)
- [eventDrop](#eventdrop)
</td><td>

- [eventDrop](#eventdrop)
- [eventDurationEditable](#eventdurationeditable)
- [eventLongPressDelay](#eventlongpressdelay)
- [eventMouseEnter](#eventmouseenter)
Expand Down Expand Up @@ -77,10 +77,10 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
- [locale](#locale)
- [longPressDelay](#longpressdelay)
- [moreLinkContent](#morelinkcontent)
</td><td>

- [noEventsClick](#noeventsclick)
- [noEventsContent](#noeventscontent)
</td><td>

- [nowIndicator](#nowindicator)
- [pointer](#pointer)
- [resources](#resources)
Expand All @@ -107,6 +107,8 @@ Inspired by [FullCalendar](https://fullcalendar.io/), implements similar options
- [view](#view)
- [viewDidMount](#viewdidmount)
- [views](#views)
- [weekNumberContent](#weeknumbercontent)
- [weekNumbers](#weeknumbers)
</td></tr>
</table>
- [Methods](#methods)
Expand Down Expand Up @@ -204,8 +206,8 @@ Or in your Svelte component, use the calendar like this:
### Pre-built browser ready bundle
Include the following lines of code in the `<head>` section of your page:
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.8.0/event-calendar.min.css">
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.8.0/event-calendar.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.9.0/event-calendar.min.css">
<script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@3.9.0/event-calendar.min.js"></script>
```

<details>
Expand Down Expand Up @@ -2263,6 +2265,45 @@ The mounted [View](#view-object) object

You can specify options that apply only to specific views. To do so provide separate options objects within the `views` option, keyed by the name of the view.

### weekNumberContent
- Type `Content` or `function`
- Default `undefined`

Defines the text that is displayed in place of the default week number (such as `W01`).

This value can be either a [Content](#content) or a function that returns content:

```js
function (arg) {
// return Content
}
```
`arg` is an object with the following properties:
<table>
<tr>
<td>

`date`
</td>
<td>JavaScript Date object containing the day within which the week number will be displayed</td>
</tr>
<tr>
<td>

`week`
</td>
<td>Calculated week number</td>
</tr>
</table>

### weekNumbers
- Type `boolean`
- Default `false`

Determines whether week numbers should be displayed in the `dayGrid` view.

The numbering of weeks depends on the value of [firstDay](#firstday). When `firstDay` is `0`, the [Western](https://en.wikipedia.org/wiki/Week#Other_week_numbering_systems) system is used. Any other value uses the [ISO](https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system) system.

## Methods
Methods allow you to manipulate the Event Calendar after initialization. They are accessible from the calendar instance.

Expand Down
Loading

0 comments on commit b5de30d

Please sign in to comment.