Skip to content

Commit 2cbb07b

Browse files
jevanlingenbtecu
authored andcommitted
Added widgetParent option (#50)
Added widgetParent option
1 parent 033e6ba commit 2cbb07b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

README.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ Accepts: `string`
315315
{{bs-datetimepicker date=myDate timeZone='Europe/Berlin'}}
316316
```
317317

318-
Set timezone
318+
Set timezone.
319319

320320

321321
#### useCurrent
@@ -358,9 +358,19 @@ Accepts: 'years', 'months', 'days'
358358
```
359359

360360
The default view to display when the picker is shown.
361-
*Note:* To limit the picker to selecting, for instance the year and month, use format: `MM/YYYY`
361+
*Note:* To limit the picker to selecting, for instance the year and month, use format: `MM/YYYY`.
362362

363+
#### widgetParent
363364

365+
Default: `null`
366+
367+
Accepts: string or jQuery object
368+
369+
```handlebars
370+
{{bs-datetimepicker date=myDate widgetParent='#an-element-id'}}
371+
```
372+
373+
On picker show, places the widget at the identifier (string) or jQuery object if the element has css position: 'relative'.
364374

365375
#### widgetPositioning
366376

addon/components/bs-datetimepicker.js

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export default Component.extend(DynamicAttributeBindings, {
6565
useCurrent: this.getWithDefault('useCurrent', false),
6666
viewDate: this.getWithDefault('viewDate', defaults.viewDate),
6767
viewMode: this.getWithDefault('viewMode', defaults.viewMode),
68+
widgetParent: this.getWithDefault('widgetParent', defaults.widgetParent),
6869
widgetPositioning: this.getWithDefault('widgetPositioning', defaults.widgetPositioning)
6970
}).on('dp.change', e => {
7071
// Convert moment to js date or default to null

0 commit comments

Comments
 (0)