Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 957cae9

Browse files
committed
6.0.1
1 parent e6a94d2 commit 957cae9

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to `laravel-form-components` will be documented in this file
44

5+
## 6.0.1 - 2021-11-11
6+
### Updated
7+
- Add support for `x-model` on inputs
8+
- Add `onOpen` slot to date picker component
9+
510
## 6.0.0 - 2021-09-20
611
### Added
712
- Register all components under a the `form-components::` namespace

docs/inputs/date-picker.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,29 @@ specify any option callbacks you need to:
118118
```html
119119
<x-date-picker name="birthday">
120120
<x-slot name="optionsSlot">
121-
onOpen: (selectedDates, dateStr, instance) => {
121+
onChange: (selectedDates, dateStr, instance) => {
122122
// ...
123123
}
124124
</x-slot>
125125
</x-date-picker>
126126
```
127127

128-
In the example above, we are injecting a callback for the `onOpen` event fired by flatpickr into the flatpickr options object.
128+
In the example above, we are injecting a callback for the `onChange` event fired by flatpickr into the flatpickr options object.
129129
For more information on the callbacks available, please consult [the events api](https://flatpickr.js.org/events/).
130130

131+
By default, the date picker component defines a callback for the `onOpen` event fired by flatpickr. As of version `6.0.1`, you may utilize
132+
the `onOpen` slot to add your own callback function if needed on the component.
133+
134+
```html
135+
<x-date-picker name="birthday">
136+
<x-slot name="onOpen">
137+
function (selectedDates, dateStr, instance) {
138+
// do something
139+
},
140+
</x-slot>
141+
</x-date-picker>
142+
```
143+
131144
## Addons
132145

133146
Like the other inputs, the date picker can also have leading and trailing addons, however by default you cannot add them.

0 commit comments

Comments
 (0)