Skip to content

Commit dc120d7

Browse files
committed
Update readme with section about available actions.
1 parent 25ae7f0 commit dc120d7

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,50 @@ Default: `0` (Sunday)
203203
{{bootstrap-datepicker value=expiresAt weekStart=1}}
204204
```
205205

206+
### Actions
207+
208+
#### changeDate
209+
210+
The changeDate action is triggered when the selected date changes. It can be specified like this:
211+
212+
213+
```handlebars
214+
{{bootstrap-datepicker changeDate="changeDateAction"}}
215+
```
216+
217+
The action can be handled by a parent component, controller or route:
218+
219+
```javascript
220+
actions {
221+
changeDateAction(date) {
222+
// do sth with the new date
223+
}
224+
}
225+
```
226+
227+
#### focus-in & focus-out
228+
229+
The focus-in and focus-out actions are triggered when the respective focus events occur on the input field.
230+
231+
```handlebars
232+
{{bootstrap-datepicker focus-in="focusInAction" focus-out="focusOutAction"}}
233+
```
234+
235+
The actions can be handled by a parent component, controller or route:
236+
237+
```javascript
238+
actions {
239+
focusInAction(component, event) {
240+
// handle event
241+
},
242+
focusOutAction(component, event) {
243+
// handle event
244+
}
245+
}
246+
```
247+
248+
249+
206250
## Contributing
207251

208252
1. Fork it

0 commit comments

Comments
 (0)