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 22
33All 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
Original file line number Diff line number Diff 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.
129129For 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
133146Like 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