Skip to content

Commit

Permalink
docs: add missing docs for new changeSetting method
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Aug 18, 2024
1 parent 74e0d09 commit 15188f0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/en/reference/main/initialize-and-update.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,18 @@ The `hide()` method allows you to hide the calendar if it has been shown.
```js
calendar.hide();
```

## changeSetting()

The `changeSetting()` method allows you to change a single setting.
The first argument is the name of the setting you want to change and the second argument is the value.

```js
calendar.changeSetting('range', { min: 'today' });
```

<Info>
Please note that when the value provided is an object, it will be merged with any existing setting object properties.
For example if our internal setting is `{ range: { min: '1970-01-01', max: '2099-12-31' }}` and we provide the new setting `{ range: { max: 'today' }}`
then the new settings will become `{ range: { min: '1970-01-01', max: 'today' }}`
</Info>

0 comments on commit 15188f0

Please sign in to comment.