Skip to content

Commit

Permalink
docs: update how to get calendar instance for using jquery
Browse files Browse the repository at this point in the history
  • Loading branch information
jungeun-cho committed Jul 15, 2020
1 parent 33b3d2a commit d4b8a58
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ var calendar = new Calendar('#calendar', {
Or you can use jquery plugin. You must include jquery before using this jquery plugin.

```js
$('#calendar').tuiCalendar({
// jquery wrapper
var $calEl = $('#calendar').tuiCalendar({
defaultView: 'month',
taskView: true,
template: {
Expand All @@ -232,6 +233,11 @@ $('#calendar').tuiCalendar({
...
}
});

// You can get calendar instance
var calendarInstance = $calEl.data('tuiCalendar');

calendarInstance.createSchedules([...]);
```

## 🌏 Browser Support
Expand Down

0 comments on commit d4b8a58

Please sign in to comment.