This repository was archived by the owner on Mar 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
All notable changes to ` laravel-form-components ` will be documented in this file
4
4
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
+
5
10
## 6.0.0 - 2021-09-20
6
11
### Added
7
12
- Register all components under a the ` form-components:: ` namespace
Original file line number Diff line number Diff line change @@ -118,16 +118,29 @@ specify any option callbacks you need to:
118
118
``` html
119
119
<x-date-picker name =" birthday" >
120
120
<x-slot name =" optionsSlot" >
121
- onOpen : (selectedDates, dateStr, instance) => {
121
+ onChange : (selectedDates, dateStr, instance) => {
122
122
// ...
123
123
}
124
124
</x-slot >
125
125
</x-date-picker >
126
126
```
127
127
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.
129
129
For more information on the callbacks available, please consult [ the events api] ( https://flatpickr.js.org/events/ ) .
130
130
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
+
131
144
## Addons
132
145
133
146
Like the other inputs, the date picker can also have leading and trailing addons, however by default you cannot add them.
You can’t perform that action at this time.
0 commit comments